FunctionType class
Creates a new function. If a function with the given name already exists in the specified project, the long running operation will return ALREADY_EXISTS error.
Constructors
- FunctionType(String name, {FunctionArgs? args, CustomResourceOptions? options})
-
Creates a new FunctionType.
nameThe Pulumi resource name.argsArguments used to configure this FunctionType. The set of arguments for Function.optionsResource options controlling this resource's behavior.
Properties
-
availableMemoryMb
↔ Output<
int> -
The amount of memory in MB available for a function. Defaults to 256MB.
latefinal
-
buildEnvironmentVariables
↔ Output<
Map< String, String> > -
Build environment variables that shall be available during build time.
latefinal
-
buildId
↔ Output<
String> -
The Cloud Build ID of the latest successful deployment of the function.
latefinal
-
buildName
↔ Output<
String> -
The Cloud Build Name of the function deployment.
projects//locations//builds/.latefinal -
buildWorkerPool
↔ Output<
String> -
Name of the Cloud Build Custom Worker Pool that should be used to build the function. The format of this field is
projects/{project}/locations/{region}/workerPools/{workerPool}where{project}and{region}are the project id and region respectively where the worker pool is defined and{workerPool}is the short name of the worker pool. If the project id is not the same as the function, then the Cloud Functions Service Agent (service-@gcf-admin-robot.iam.gserviceaccount.com) must be granted the role Cloud Build Custom Workers Builder (roles/cloudbuild.customworkers.builder) in the project.latefinal -
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
description
↔ Output<
String> -
User-provided description of a function.
latefinal
-
dockerRegistry
↔ Output<
String> -
Docker Registry to use for this deployment. If
docker_repositoryfield is specified, this field will be automatically set asARTIFACT_REGISTRY. If unspecified, it currently defaults toCONTAINER_REGISTRY. This field may be overridden by the backend for eligible deployments.latefinal -
dockerRepository
↔ Output<
String> -
User managed repository created in Artifact Registry optionally with a customer managed encryption key. If specified, deployments will use Artifact Registry. If unspecified and the deployment is eligible to use Artifact Registry, GCF will create and use a repository named 'gcf-artifacts' for every deployed region. This is the repository to which the function docker image will be pushed after it is built by Cloud Build. It must match the pattern
projects/{project}/locations/{location}/repositories/{repository}. Cross-project repositories are not supported. Cross-location repositories are not supported. Repository format must be 'DOCKER'.latefinal -
entryPoint
↔ Output<
String> -
The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix (ID of the function), if not specified.
latefinal
-
environmentVariables
↔ Output<
Map< String, String> > -
Environment variables that shall be available during function execution.
latefinal
-
eventTrigger
↔ Output<
EventTriggerResponse> -
A source that fires events in response to a condition in another service.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
httpsTrigger
↔ Output<
HttpsTriggerResponse> -
An HTTPS endpoint type of source that can be triggered via URL.
latefinal
-
id
↔ Output<
String> -
getter/setter pairinherited
-
ingressSettings
↔ Output<
String> -
The ingress settings for the function, controlling what traffic can reach it.
latefinal
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
kmsKeyName
↔ Output<
String> -
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 thedocker_repositoryfield that was created with the same KMS crypto key. The following service accounts need to be granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the Key/KeyRing/Project/Organization (least access preferred). 1. Google Cloud Functions service account (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) - Required to protect the function's image. 2. Google Storage service account (service-{project_number}@gs-project-accounts.iam.gserviceaccount.com) - Required to protect the function's source code. If this service account does not exist, deploying a function without a KMS key or retrieving the service agent name provisions it. For more information, see https://cloud.google.com/storage/docs/projects#service-agents and https://cloud.google.com/storage/docs/getting-service-agent#gsutil. Google Cloud Functions delegates access to service agents to protect function resources in internal projects that are not accessible by the end user.latefinal -
labels
↔ Output<
Map< String, String> > -
Labels associated with this Cloud Function.
latefinal
-
location
↔ Output<
String> -
latefinal
-
maxInstances
↔ Output<
int> -
The limit on the maximum number of function instances that may coexist at a given time. In some cases, such as rapid traffic surges, Cloud Functions may, for a short period of time, create more instances than the specified max instances limit. If your function cannot tolerate this temporary behavior, you may want to factor in a safety margin and set a lower max instances value than your function can tolerate. See the Max Instances Guide for more details.
latefinal
-
minInstances
↔ Output<
int> -
A lower bound for the number function instances that may coexist at a given time.
latefinal
-
name
↔ Output<
String> -
A user-defined name of the function. Function names must be unique globally and match pattern
projects/*/locations/*/functions/*latefinal -
network
↔ Output<
String> -
Deprecated: use vpc_connector
latefinal
-
project
↔ Output<
String> -
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
-
runtime
↔ Output<
String> -
The runtime in which to run the function. Required when deploying a new function, optional when updating an existing function. For a complete list of possible choices, see the
gcloudcommand reference.latefinal - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
secretEnvironmentVariables
↔ Output<
List< Map< >String, dynamic> > -
Secret environment variables configuration.
latefinal
-
secretVolumes
↔ Output<
List< Map< >String, dynamic> > -
Secret volumes configuration.
latefinal
-
serviceAccountEmail
↔ Output<
String> -
The email of the function's service account. If empty, defaults to
{project_id}@appspot.gserviceaccount.com.latefinal -
sourceArchiveUrl
↔ Output<
String> -
The Google Cloud Storage URL, starting with
gs://, pointing to the zip archive which contains the function.latefinal -
sourceRepository
↔ Output<
SourceRepositoryResponse> -
Beta Feature The source repository where a function is hosted.
latefinal
-
sourceToken
↔ Output<
String> -
Input only. An identifier for Firebase function sources. Disclaimer: This field is only supported for Firebase function deployments.
latefinal
-
sourceUploadUrl
↔ Output<
String> -
The Google Cloud Storage signed URL used for source uploading, generated by calling
google.cloud.functions.v1.GenerateUploadUrl. The signature is validated on write methods (Create, Update) The signature is stripped from the Function object on read methods (Get, List)latefinal -
status
↔ Output<
String> -
Status of the function deployment.
latefinal
-
timeout
↔ Output<
String> -
The function execution timeout. Execution is considered failed and can be terminated if the function is not completed at the end of the timeout period. Defaults to 60 seconds.
latefinal
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
updateTime
↔ Output<
String> -
The last update timestamp of a Cloud Function.
latefinal
-
urn
↔ Output<
String> -
latefinalinherited
-
versionId
↔ Output<
String> -
The version identifier of the Cloud Function. Each deployment attempt results in a new version of a function being created.
latefinal
-
vpcConnector
↔ Output<
String> -
The VPC Network Connector that this cloud function can connect to. It can be either the fully-qualified URI, or the short name of the network connector resource. The format of this field is
projects/*/locations/*/connectors/*This field is mutually exclusive withnetworkfield and will eventually replace it. See the VPC documentation for more information on connecting Cloud projects.latefinal -
vpcConnectorEgressSettings
↔ Output<
String> -
The egress settings for the connector, controlling what traffic is diverted through it.
latefinal
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited