Class FunctionState.Builder

  • Enclosing class:
    FunctionState

    public static final class FunctionState.Builder
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • availableMemoryMb

        public FunctionState.Builder availableMemoryMb​(@Nullable
                                                       com.pulumi.core.Output<java.lang.Integer> availableMemoryMb)
        Parameters:
        availableMemoryMb - Memory (in MB), available to the function. Default value is `256`. Possible values include `128`, `256`, `512`, `1024`, etc.
        Returns:
        builder
      • availableMemoryMb

        public FunctionState.Builder availableMemoryMb​(java.lang.Integer availableMemoryMb)
        Parameters:
        availableMemoryMb - Memory (in MB), available to the function. Default value is `256`. Possible values include `128`, `256`, `512`, `1024`, etc.
        Returns:
        builder
      • buildEnvironmentVariables

        public FunctionState.Builder buildEnvironmentVariables​(@Nullable
                                                               com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.Object>> buildEnvironmentVariables)
        Parameters:
        buildEnvironmentVariables - A set of key/value environment variable pairs available during build time.
        Returns:
        builder
      • buildEnvironmentVariables

        public FunctionState.Builder buildEnvironmentVariables​(java.util.Map<java.lang.String,​java.lang.Object> buildEnvironmentVariables)
        Parameters:
        buildEnvironmentVariables - A set of key/value environment variable pairs available during build time.
        Returns:
        builder
      • buildWorkerPool

        public FunctionState.Builder buildWorkerPool​(@Nullable
                                                     com.pulumi.core.Output<java.lang.String> buildWorkerPool)
        Parameters:
        buildWorkerPool - Name of the Cloud Build Custom Worker Pool that should be used to build the function.
        Returns:
        builder
      • buildWorkerPool

        public FunctionState.Builder buildWorkerPool​(java.lang.String buildWorkerPool)
        Parameters:
        buildWorkerPool - Name of the Cloud Build Custom Worker Pool that should be used to build the function.
        Returns:
        builder
      • description

        public FunctionState.Builder description​(@Nullable
                                                 com.pulumi.core.Output<java.lang.String> description)
        Parameters:
        description - Description of the function.
        Returns:
        builder
      • description

        public FunctionState.Builder description​(java.lang.String description)
        Parameters:
        description - Description of the function.
        Returns:
        builder
      • dockerRegistry

        public FunctionState.Builder dockerRegistry​(@Nullable
                                                    com.pulumi.core.Output<java.lang.String> dockerRegistry)
        Parameters:
        dockerRegistry - Docker Registry to use for storing the function's Docker images. Allowed values are CONTAINER_REGISTRY (default) and ARTIFACT_REGISTRY.
        Returns:
        builder
      • dockerRegistry

        public FunctionState.Builder dockerRegistry​(java.lang.String dockerRegistry)
        Parameters:
        dockerRegistry - Docker Registry to use for storing the function's Docker images. Allowed values are CONTAINER_REGISTRY (default) and ARTIFACT_REGISTRY.
        Returns:
        builder
      • dockerRepository

        public FunctionState.Builder dockerRepository​(@Nullable
                                                      com.pulumi.core.Output<java.lang.String> dockerRepository)
        Parameters:
        dockerRepository - User managed repository created in Artifact Registry optionally with a customer managed encryption key. If specified, deployments will use Artifact Registry. This is the repository to which the function docker image will be pushed after it is built by Cloud Build. If unspecified, Container Registry will be used by default, unless specified otherwise by other means.
        Returns:
        builder
      • dockerRepository

        public FunctionState.Builder dockerRepository​(java.lang.String dockerRepository)
        Parameters:
        dockerRepository - User managed repository created in Artifact Registry optionally with a customer managed encryption key. If specified, deployments will use Artifact Registry. This is the repository to which the function docker image will be pushed after it is built by Cloud Build. If unspecified, Container Registry will be used by default, unless specified otherwise by other means.
        Returns:
        builder
      • effectiveLabels

        public FunctionState.Builder effectiveLabels​(@Nullable
                                                     com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> effectiveLabels)
        Parameters:
        effectiveLabels - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
        Returns:
        builder
      • effectiveLabels

        public FunctionState.Builder effectiveLabels​(java.util.Map<java.lang.String,​java.lang.String> effectiveLabels)
        Parameters:
        effectiveLabels - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
        Returns:
        builder
      • entryPoint

        public FunctionState.Builder entryPoint​(@Nullable
                                                com.pulumi.core.Output<java.lang.String> entryPoint)
        Parameters:
        entryPoint - Name of the function that will be executed when the Google Cloud Function is triggered.
        Returns:
        builder
      • entryPoint

        public FunctionState.Builder entryPoint​(java.lang.String entryPoint)
        Parameters:
        entryPoint - Name of the function that will be executed when the Google Cloud Function is triggered.
        Returns:
        builder
      • environmentVariables

        public FunctionState.Builder environmentVariables​(@Nullable
                                                          com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.Object>> environmentVariables)
        Parameters:
        environmentVariables - A set of key/value environment variable pairs to assign to the function.
        Returns:
        builder
      • environmentVariables

        public FunctionState.Builder environmentVariables​(java.util.Map<java.lang.String,​java.lang.Object> environmentVariables)
        Parameters:
        environmentVariables - A set of key/value environment variable pairs to assign to the function.
        Returns:
        builder
      • eventTrigger

        public FunctionState.Builder eventTrigger​(@Nullable
                                                  com.pulumi.core.Output<FunctionEventTriggerArgs> eventTrigger)
        Parameters:
        eventTrigger - A source that fires events in response to a condition in another service. Structure is documented below. Cannot be used with `trigger_http`.
        Returns:
        builder
      • eventTrigger

        public FunctionState.Builder eventTrigger​(FunctionEventTriggerArgs eventTrigger)
        Parameters:
        eventTrigger - A source that fires events in response to a condition in another service. Structure is documented below. Cannot be used with `trigger_http`.
        Returns:
        builder
      • httpsTriggerSecurityLevel

        public FunctionState.Builder httpsTriggerSecurityLevel​(@Nullable
                                                               com.pulumi.core.Output<java.lang.String> httpsTriggerSecurityLevel)
        Parameters:
        httpsTriggerSecurityLevel - The security level for the function. The following options are available:
        Returns:
        builder
      • httpsTriggerSecurityLevel

        public FunctionState.Builder httpsTriggerSecurityLevel​(java.lang.String httpsTriggerSecurityLevel)
        Parameters:
        httpsTriggerSecurityLevel - The security level for the function. The following options are available:
        Returns:
        builder
      • httpsTriggerUrl

        public FunctionState.Builder httpsTriggerUrl​(@Nullable
                                                     com.pulumi.core.Output<java.lang.String> httpsTriggerUrl)
        Parameters:
        httpsTriggerUrl - URL which triggers function execution. Returned only if `trigger_http` is used.
        Returns:
        builder
      • httpsTriggerUrl

        public FunctionState.Builder httpsTriggerUrl​(java.lang.String httpsTriggerUrl)
        Parameters:
        httpsTriggerUrl - URL which triggers function execution. Returned only if `trigger_http` is used.
        Returns:
        builder
      • ingressSettings

        public FunctionState.Builder ingressSettings​(@Nullable
                                                     com.pulumi.core.Output<java.lang.String> ingressSettings)
        Parameters:
        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](https://cloud.google.com/functions/docs/networking/network-settings#ingress_settings) to see the impact of each settings value. Changes to this field will recreate the cloud function.
        Returns:
        builder
      • ingressSettings

        public FunctionState.Builder ingressSettings​(java.lang.String ingressSettings)
        Parameters:
        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](https://cloud.google.com/functions/docs/networking/network-settings#ingress_settings) to see the impact of each settings value. Changes to this field will recreate the cloud function.
        Returns:
        builder
      • kmsKeyName

        public FunctionState.Builder kmsKeyName​(@Nullable
                                                com.pulumi.core.Output<java.lang.String> kmsKeyName)
        Parameters:
        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}`. If specified, you must also provide an artifact registry repository using the `docker_repository` field that was created with the same KMS crypto key. Before deploying, please complete all pre-requisites described in https://cloud.google.com/functions/docs/securing/cmek#granting_service_accounts_access_to_the_key
        Returns:
        builder
      • kmsKeyName

        public FunctionState.Builder kmsKeyName​(java.lang.String kmsKeyName)
        Parameters:
        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}`. If specified, you must also provide an artifact registry repository using the `docker_repository` field that was created with the same KMS crypto key. Before deploying, please complete all pre-requisites described in https://cloud.google.com/functions/docs/securing/cmek#granting_service_accounts_access_to_the_key
        Returns:
        builder
      • labels

        public FunctionState.Builder labels​(@Nullable
                                            com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.Object>> labels)
        Parameters:
        labels - A set of key/value label pairs to assign to the function. Label keys must follow the requirements at https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements. **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
        Returns:
        builder
      • labels

        public FunctionState.Builder labels​(java.util.Map<java.lang.String,​java.lang.Object> labels)
        Parameters:
        labels - A set of key/value label pairs to assign to the function. Label keys must follow the requirements at https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements. **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
        Returns:
        builder
      • maxInstances

        public FunctionState.Builder maxInstances​(@Nullable
                                                  com.pulumi.core.Output<java.lang.Integer> maxInstances)
        Parameters:
        maxInstances - The limit on the maximum number of function instances that may coexist at a given time.
        Returns:
        builder
      • maxInstances

        public FunctionState.Builder maxInstances​(java.lang.Integer maxInstances)
        Parameters:
        maxInstances - The limit on the maximum number of function instances that may coexist at a given time.
        Returns:
        builder
      • minInstances

        public FunctionState.Builder minInstances​(@Nullable
                                                  com.pulumi.core.Output<java.lang.Integer> minInstances)
        Parameters:
        minInstances - The limit on the minimum number of function instances that may coexist at a given time.
        Returns:
        builder
      • minInstances

        public FunctionState.Builder minInstances​(java.lang.Integer minInstances)
        Parameters:
        minInstances - The limit on the minimum number of function instances that may coexist at a given time.
        Returns:
        builder
      • name

        public FunctionState.Builder name​(@Nullable
                                          com.pulumi.core.Output<java.lang.String> name)
        Parameters:
        name - A user-defined name of the function. Function names must be unique globally.
        Returns:
        builder
      • name

        public FunctionState.Builder name​(java.lang.String name)
        Parameters:
        name - A user-defined name of the function. Function names must be unique globally.
        Returns:
        builder
      • project

        public FunctionState.Builder project​(@Nullable
                                             com.pulumi.core.Output<java.lang.String> project)
        Parameters:
        project - Project of the function. If it is not provided, the provider project is used.
        Returns:
        builder
      • project

        public FunctionState.Builder project​(java.lang.String project)
        Parameters:
        project - Project of the function. If it is not provided, the provider project is used.
        Returns:
        builder
      • pulumiLabels

        public FunctionState.Builder pulumiLabels​(@Nullable
                                                  com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> pulumiLabels)
        Parameters:
        pulumiLabels - The combination of labels configured directly on the resource and default labels configured on the provider.
        Returns:
        builder
      • pulumiLabels

        public FunctionState.Builder pulumiLabels​(java.util.Map<java.lang.String,​java.lang.String> pulumiLabels)
        Parameters:
        pulumiLabels - The combination of labels configured directly on the resource and default labels configured on the provider.
        Returns:
        builder
      • region

        public FunctionState.Builder region​(@Nullable
                                            com.pulumi.core.Output<java.lang.String> region)
        Parameters:
        region - Region of function. If it is not provided, the provider region is used.
        Returns:
        builder
      • region

        public FunctionState.Builder region​(java.lang.String region)
        Parameters:
        region - Region of function. If it is not provided, the provider region is used.
        Returns:
        builder
      • runtime

        public FunctionState.Builder runtime​(@Nullable
                                             com.pulumi.core.Output<java.lang.String> runtime)
        Parameters:
        runtime - The runtime in which the function is going to run. Eg. `"nodejs16"`, `"python39"`, `"dotnet3"`, `"go116"`, `"java11"`, `"ruby30"`, `"php74"`, etc. Check the [official doc](https://cloud.google.com/functions/docs/concepts/exec#runtimes) for the up-to-date list. ***
        Returns:
        builder
      • runtime

        public FunctionState.Builder runtime​(java.lang.String runtime)
        Parameters:
        runtime - The runtime in which the function is going to run. Eg. `"nodejs16"`, `"python39"`, `"dotnet3"`, `"go116"`, `"java11"`, `"ruby30"`, `"php74"`, etc. Check the [official doc](https://cloud.google.com/functions/docs/concepts/exec#runtimes) for the up-to-date list. ***
        Returns:
        builder
      • secretEnvironmentVariables

        public FunctionState.Builder secretEnvironmentVariables​(@Nullable
                                                                com.pulumi.core.Output<java.util.List<FunctionSecretEnvironmentVariableArgs>> secretEnvironmentVariables)
        Parameters:
        secretEnvironmentVariables - Secret environment variables configuration. Structure is documented below.
        Returns:
        builder
      • secretEnvironmentVariables

        public FunctionState.Builder secretEnvironmentVariables​(java.util.List<FunctionSecretEnvironmentVariableArgs> secretEnvironmentVariables)
        Parameters:
        secretEnvironmentVariables - Secret environment variables configuration. Structure is documented below.
        Returns:
        builder
      • secretEnvironmentVariables

        public FunctionState.Builder secretEnvironmentVariables​(FunctionSecretEnvironmentVariableArgs... secretEnvironmentVariables)
        Parameters:
        secretEnvironmentVariables - Secret environment variables configuration. Structure is documented below.
        Returns:
        builder
      • secretVolumes

        public FunctionState.Builder secretVolumes​(@Nullable
                                                   com.pulumi.core.Output<java.util.List<FunctionSecretVolumeArgs>> secretVolumes)
        Parameters:
        secretVolumes - Secret volumes configuration. Structure is documented below.
        Returns:
        builder
      • secretVolumes

        public FunctionState.Builder secretVolumes​(java.util.List<FunctionSecretVolumeArgs> secretVolumes)
        Parameters:
        secretVolumes - Secret volumes configuration. Structure is documented below.
        Returns:
        builder
      • serviceAccountEmail

        public FunctionState.Builder serviceAccountEmail​(@Nullable
                                                         com.pulumi.core.Output<java.lang.String> serviceAccountEmail)
        Parameters:
        serviceAccountEmail - If provided, the self-provided service account to run the function with.
        Returns:
        builder
      • serviceAccountEmail

        public FunctionState.Builder serviceAccountEmail​(java.lang.String serviceAccountEmail)
        Parameters:
        serviceAccountEmail - If provided, the self-provided service account to run the function with.
        Returns:
        builder
      • sourceArchiveBucket

        public FunctionState.Builder sourceArchiveBucket​(@Nullable
                                                         com.pulumi.core.Output<java.lang.String> sourceArchiveBucket)
        Parameters:
        sourceArchiveBucket - The GCS bucket containing the zip archive which contains the function.
        Returns:
        builder
      • sourceArchiveBucket

        public FunctionState.Builder sourceArchiveBucket​(java.lang.String sourceArchiveBucket)
        Parameters:
        sourceArchiveBucket - The GCS bucket containing the zip archive which contains the function.
        Returns:
        builder
      • sourceArchiveObject

        public FunctionState.Builder sourceArchiveObject​(@Nullable
                                                         com.pulumi.core.Output<java.lang.String> sourceArchiveObject)
        Parameters:
        sourceArchiveObject - The source archive object (file) in archive bucket.
        Returns:
        builder
      • sourceArchiveObject

        public FunctionState.Builder sourceArchiveObject​(java.lang.String sourceArchiveObject)
        Parameters:
        sourceArchiveObject - The source archive object (file) in archive bucket.
        Returns:
        builder
      • sourceRepository

        public FunctionState.Builder sourceRepository​(@Nullable
                                                      com.pulumi.core.Output<FunctionSourceRepositoryArgs> sourceRepository)
        Parameters:
        sourceRepository - Represents parameters related to source repository where a function is hosted. Cannot be set alongside `source_archive_bucket` or `source_archive_object`. Structure is documented below. It must match the pattern `projects/{project}/locations/{location}/repositories/{repository}`.*
        Returns:
        builder
      • sourceRepository

        public FunctionState.Builder sourceRepository​(FunctionSourceRepositoryArgs sourceRepository)
        Parameters:
        sourceRepository - Represents parameters related to source repository where a function is hosted. Cannot be set alongside `source_archive_bucket` or `source_archive_object`. Structure is documented below. It must match the pattern `projects/{project}/locations/{location}/repositories/{repository}`.*
        Returns:
        builder
      • status

        public FunctionState.Builder status​(@Nullable
                                            com.pulumi.core.Output<java.lang.String> status)
        Parameters:
        status - Describes the current stage of a deployment.
        Returns:
        builder
      • status

        public FunctionState.Builder status​(java.lang.String status)
        Parameters:
        status - Describes the current stage of a deployment.
        Returns:
        builder
      • timeout

        public FunctionState.Builder timeout​(@Nullable
                                             com.pulumi.core.Output<java.lang.Integer> timeout)
        Parameters:
        timeout - Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds.
        Returns:
        builder
      • timeout

        public FunctionState.Builder timeout​(java.lang.Integer timeout)
        Parameters:
        timeout - Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds.
        Returns:
        builder
      • triggerHttp

        public FunctionState.Builder triggerHttp​(@Nullable
                                                 com.pulumi.core.Output<java.lang.Boolean> triggerHttp)
        Parameters:
        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 `https_trigger_url`. Cannot be used with `event_trigger`.
        Returns:
        builder
      • triggerHttp

        public FunctionState.Builder triggerHttp​(java.lang.Boolean triggerHttp)
        Parameters:
        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 `https_trigger_url`. Cannot be used with `event_trigger`.
        Returns:
        builder
      • vpcConnector

        public FunctionState.Builder vpcConnector​(@Nullable
                                                  com.pulumi.core.Output<java.lang.String> vpcConnector)
        Parameters:
        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/*`.
        Returns:
        builder
      • vpcConnector

        public FunctionState.Builder vpcConnector​(java.lang.String vpcConnector)
        Parameters:
        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/*`.
        Returns:
        builder
      • vpcConnectorEgressSettings

        public FunctionState.Builder vpcConnectorEgressSettings​(@Nullable
                                                                com.pulumi.core.Output<java.lang.String> vpcConnectorEgressSettings)
        Parameters:
        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.
        Returns:
        builder
      • vpcConnectorEgressSettings

        public FunctionState.Builder vpcConnectorEgressSettings​(java.lang.String vpcConnectorEgressSettings)
        Parameters:
        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.
        Returns:
        builder