FunctionArgs constructor

const FunctionArgs({
  1. Input<Map<String, dynamic>?>? automaticUpdatePolicy,
  2. Input<int?>? availableMemoryMb,
  3. Input<Map<String, String>?>? buildEnvironmentVariables,
  4. Input<String?>? buildServiceAccount,
  5. Input<String?>? buildWorkerPool,
  6. Input<String?>? deletionPolicy,
  7. Input<String?>? description,
  8. Input<String?>? dockerRegistry,
  9. Input<String?>? dockerRepository,
  10. Input<String?>? entryPoint,
  11. Input<Map<String, String>?>? environmentVariables,
  12. Input<FunctionEventTrigger?>? eventTrigger,
  13. Input<String?>? httpsTriggerSecurityLevel,
  14. Input<String?>? httpsTriggerUrl,
  15. Input<String?>? ingressSettings,
  16. Input<String?>? kmsKeyName,
  17. Input<Map<String, String>?>? labels,
  18. Input<int?>? maxInstances,
  19. Input<int?>? minInstances,
  20. Input<String?>? name,
  21. Input<FunctionOnDeployUpdatePolicy?>? onDeployUpdatePolicy,
  22. Input<String?>? project,
  23. Input<String?>? region,
  24. required Input<String> runtime,
  25. Input<List<FunctionSecretEnvironmentVariable>?>? secretEnvironmentVariables,
  26. Input<List<FunctionSecretVolume>?>? secretVolumes,
  27. Input<String?>? serviceAccountEmail,
  28. Input<String?>? sourceArchiveBucket,
  29. Input<String?>? sourceArchiveObject,
  30. Input<FunctionSourceRepository?>? sourceRepository,
  31. Input<int?>? timeout,
  32. Input<bool?>? triggerHttp,
  33. Input<String?>? vpcConnector,
  34. Input<String?>? vpcConnectorEgressSettings,
})

Creates a new FunctionArgs. automaticUpdatePolicy Security patches are applied automatically to the runtime without requiring the function to be redeployed. This should be specified as an empty block and cannot be set alongside onDeployUpdatePolicy. availableMemoryMb Memory (in MB), available to the function. Default value is 256. Possible values include 128, 256, 512, 1024, etc. buildEnvironmentVariables A set of key/value environment variable pairs available during build time. buildServiceAccount If provided, the self-provided service account to use to build the function. The format of this field is projects/{project}/serviceAccounts/{serviceAccountEmail} buildWorkerPool Name of the Cloud Build Custom Worker Pool that should be used to build the function. deletionPolicy Whether Terraform will be prevented from destroying the resource. Defaults to "DELETE". description Description of the function. dockerRegistry Docker Registry to use for storing the function's Docker images. Allowed values are ARTIFACT_REGISTRY (default) and CONTAINER_REGISTRY. dockerRepository User-managed repository created in Artifact Registry to which the function's Docker image will be pushed after it is built by Cloud Build. May optionally be encrypted with a customer-managed encryption key (CMEK). If unspecified and dockerRegistry is not explicitly set to CONTAINER_REGISTRY, GCF will create and use a default Artifact Registry repository named 'gcf-artifacts' in the region. entryPoint Name of the function that will be executed when the Google Cloud Function is triggered. environmentVariables A set of key/value environment variable pairs to assign to the function. eventTrigger A source that fires events in response to a condition in another service. Structure is documented below. Cannot be used with triggerHttp. httpsTriggerSecurityLevel The security level for the function. The following options are available: httpsTriggerUrl URL which triggers function execution. Returned only if triggerHttp is used. ingressSettings String value that controls what traffic can reach the function. Allowed values are ALLOW_ALL, ALLOW_INTERNAL_AND_GCLB and ALLOW_INTERNAL_ONLY. Check ingress documentation to see the impact of each settings value. Changes to this field will recreate the cloud function. kmsKeyName Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources. It must match the pattern projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. labels A set of key/value label pairs to assign to the function. Label keys must follow the requirements at https://docs.cloud.google.com/resource-manager/docs/creating-managing-labels#requirements. maxInstances The limit on the maximum number of function instances that may coexist at a given time. minInstances The limit on the minimum number of function instances that may coexist at a given time. name A user-defined name of the function. Function names must be unique globally. onDeployUpdatePolicy Security patches are only applied when a function is redeployed. This should be specified as an empty block and cannot be set alongside automaticUpdatePolicy. Structure is documented below. project Project of the function. If it is not provided, the provider project is used. region Region of function. If it is not provided, the provider region is used. runtime The runtime in which the function is going to run. secretEnvironmentVariables Secret environment variables configuration. Structure is documented below. secretVolumes Secret volumes configuration. Structure is documented below. serviceAccountEmail If provided, the self-provided service account to run the function with. sourceArchiveBucket The GCS bucket containing the zip archive which contains the function. sourceArchiveObject The source archive object (file) in archive bucket. sourceRepository Represents parameters related to source repository where a function is hosted. timeout Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds. triggerHttp Boolean variable. Any HTTP request (of a supported type) to the endpoint will trigger function execution. Supported HTTP request types are: POST, PUT, GET, DELETE, and OPTIONS. Endpoint is returned as httpsTriggerUrl. Cannot be used with eventTrigger. vpcConnector The VPC Network Connector that this cloud function can connect to. It should be set up as fully-qualified URI. The format of this field is projects/*/locations/*/connectors/*. vpcConnectorEgressSettings The egress settings for the connector, controlling what traffic is diverted through it. Allowed values are ALL_TRAFFIC and PRIVATE_RANGES_ONLY. Defaults to PRIVATE_RANGES_ONLY. If unset, this field preserves the previously set value.

Implementation

const FunctionArgs({
  this.automaticUpdatePolicy,
  this.availableMemoryMb,
  this.buildEnvironmentVariables,
  this.buildServiceAccount,
  this.buildWorkerPool,
  this.deletionPolicy,
  this.description,
  this.dockerRegistry,
  this.dockerRepository,
  this.entryPoint,
  this.environmentVariables,
  this.eventTrigger,
  this.httpsTriggerSecurityLevel,
  this.httpsTriggerUrl,
  this.ingressSettings,
  this.kmsKeyName,
  this.labels,
  this.maxInstances,
  this.minInstances,
  this.name,
  this.onDeployUpdatePolicy,
  this.project,
  this.region,
  required this.runtime,
  this.secretEnvironmentVariables,
  this.secretVolumes,
  this.serviceAccountEmail,
  this.sourceArchiveBucket,
  this.sourceArchiveObject,
  this.sourceRepository,
  this.timeout,
  this.triggerHttp,
  this.vpcConnector,
  this.vpcConnectorEgressSettings,
});