Google Cloud v8.21.0 published on Wednesday, Mar 5, 2025 by Pulumi
gcp.storage.getBucket
Explore with Pulumi AI
Gets an existing bucket in Google Cloud Storage service (GCS). See the official documentation and API.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const my_bucket = gcp.storage.getBucket({
    name: "my-bucket",
});
import pulumi
import pulumi_gcp as gcp
my_bucket = gcp.storage.get_bucket(name="my-bucket")
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/storage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := storage.LookupBucket(ctx, &storage.LookupBucketArgs{
			Name: "my-bucket",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() => 
{
    var my_bucket = Gcp.Storage.GetBucket.Invoke(new()
    {
        Name = "my-bucket",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.storage.StorageFunctions;
import com.pulumi.gcp.storage.inputs.GetBucketArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var my-bucket = StorageFunctions.getBucket(GetBucketArgs.builder()
            .name("my-bucket")
            .build());
    }
}
variables:
  my-bucket:
    fn::invoke:
      function: gcp:storage:getBucket
      arguments:
        name: my-bucket
Using getBucket
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getBucket(args: GetBucketArgs, opts?: InvokeOptions): Promise<GetBucketResult>
function getBucketOutput(args: GetBucketOutputArgs, opts?: InvokeOptions): Output<GetBucketResult>def get_bucket(name: Optional[str] = None,
               project: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetBucketResult
def get_bucket_output(name: Optional[pulumi.Input[str]] = None,
               project: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetBucketResult]func LookupBucket(ctx *Context, args *LookupBucketArgs, opts ...InvokeOption) (*LookupBucketResult, error)
func LookupBucketOutput(ctx *Context, args *LookupBucketOutputArgs, opts ...InvokeOption) LookupBucketResultOutput> Note: This function is named LookupBucket in the Go SDK.
public static class GetBucket 
{
    public static Task<GetBucketResult> InvokeAsync(GetBucketArgs args, InvokeOptions? opts = null)
    public static Output<GetBucketResult> Invoke(GetBucketInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetBucketResult> getBucket(GetBucketArgs args, InvokeOptions options)
public static Output<GetBucketResult> getBucket(GetBucketArgs args, InvokeOptions options)
fn::invoke:
  function: gcp:storage/getBucket:getBucket
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- The name of the bucket.
- Project string
- The ID of the project in which the resource belongs. If it is not provided then the data source will use the Compute API to find the project id that corresponds to the project number returned from the Storage API, and if no Compute API permissions are available or if the Compute API is disabled it defaults to the provider value. Supplying a value for projectdoesn't influence retrieving data about the bucket but it can be used to prevent use of the Compute API. If you do provide aprojectvalue ensure that it is the correct value for that bucket; the data source will not check that the project id and project number match.
- Name string
- The name of the bucket.
- Project string
- The ID of the project in which the resource belongs. If it is not provided then the data source will use the Compute API to find the project id that corresponds to the project number returned from the Storage API, and if no Compute API permissions are available or if the Compute API is disabled it defaults to the provider value. Supplying a value for projectdoesn't influence retrieving data about the bucket but it can be used to prevent use of the Compute API. If you do provide aprojectvalue ensure that it is the correct value for that bucket; the data source will not check that the project id and project number match.
- name String
- The name of the bucket.
- project String
- The ID of the project in which the resource belongs. If it is not provided then the data source will use the Compute API to find the project id that corresponds to the project number returned from the Storage API, and if no Compute API permissions are available or if the Compute API is disabled it defaults to the provider value. Supplying a value for projectdoesn't influence retrieving data about the bucket but it can be used to prevent use of the Compute API. If you do provide aprojectvalue ensure that it is the correct value for that bucket; the data source will not check that the project id and project number match.
- name string
- The name of the bucket.
- project string
- The ID of the project in which the resource belongs. If it is not provided then the data source will use the Compute API to find the project id that corresponds to the project number returned from the Storage API, and if no Compute API permissions are available or if the Compute API is disabled it defaults to the provider value. Supplying a value for projectdoesn't influence retrieving data about the bucket but it can be used to prevent use of the Compute API. If you do provide aprojectvalue ensure that it is the correct value for that bucket; the data source will not check that the project id and project number match.
- name str
- The name of the bucket.
- project str
- The ID of the project in which the resource belongs. If it is not provided then the data source will use the Compute API to find the project id that corresponds to the project number returned from the Storage API, and if no Compute API permissions are available or if the Compute API is disabled it defaults to the provider value. Supplying a value for projectdoesn't influence retrieving data about the bucket but it can be used to prevent use of the Compute API. If you do provide aprojectvalue ensure that it is the correct value for that bucket; the data source will not check that the project id and project number match.
- name String
- The name of the bucket.
- project String
- The ID of the project in which the resource belongs. If it is not provided then the data source will use the Compute API to find the project id that corresponds to the project number returned from the Storage API, and if no Compute API permissions are available or if the Compute API is disabled it defaults to the provider value. Supplying a value for projectdoesn't influence retrieving data about the bucket but it can be used to prevent use of the Compute API. If you do provide aprojectvalue ensure that it is the correct value for that bucket; the data source will not check that the project id and project number match.
getBucket Result
The following output properties are available:
- Autoclasses
List<GetBucket Autoclass> 
- Cors
List<GetBucket Cor> 
- CustomPlacement List<GetConfigs Bucket Custom Placement Config> 
- DefaultEvent boolBased Hold 
- EffectiveLabels Dictionary<string, string>
- EnableObject boolRetention 
- Encryptions
List<GetBucket Encryption> 
- ForceDestroy bool
- HierarchicalNamespaces List<GetBucket Hierarchical Namespace> 
- Id string
- The provider-assigned unique ID for this managed resource.
- Labels Dictionary<string, string>
- LifecycleRules List<GetBucket Lifecycle Rule> 
- Location string
- Loggings
List<GetBucket Logging> 
- Name string
- ProjectNumber int
- PublicAccess stringPrevention 
- PulumiLabels Dictionary<string, string>
- RequesterPays bool
- RetentionPolicies List<GetBucket Retention Policy> 
- Rpo string
- SelfLink string
- SoftDelete List<GetPolicies Bucket Soft Delete Policy> 
- StorageClass string
- UniformBucket boolLevel Access 
- Url string
- Versionings
List<GetBucket Versioning> 
- Websites
List<GetBucket Website> 
- Project string
- Autoclasses
[]GetBucket Autoclass 
- Cors
[]GetBucket Cor 
- CustomPlacement []GetConfigs Bucket Custom Placement Config 
- DefaultEvent boolBased Hold 
- EffectiveLabels map[string]string
- EnableObject boolRetention 
- Encryptions
[]GetBucket Encryption 
- ForceDestroy bool
- HierarchicalNamespaces []GetBucket Hierarchical Namespace 
- Id string
- The provider-assigned unique ID for this managed resource.
- Labels map[string]string
- LifecycleRules []GetBucket Lifecycle Rule 
- Location string
- Loggings
[]GetBucket Logging 
- Name string
- ProjectNumber int
- PublicAccess stringPrevention 
- PulumiLabels map[string]string
- RequesterPays bool
- RetentionPolicies []GetBucket Retention Policy 
- Rpo string
- SelfLink string
- SoftDelete []GetPolicies Bucket Soft Delete Policy 
- StorageClass string
- UniformBucket boolLevel Access 
- Url string
- Versionings
[]GetBucket Versioning 
- Websites
[]GetBucket Website 
- Project string
- autoclasses
List<GetBucket Autoclass> 
- cors
List<GetBucket Cor> 
- customPlacement List<GetConfigs Bucket Custom Placement Config> 
- defaultEvent BooleanBased Hold 
- effectiveLabels Map<String,String>
- enableObject BooleanRetention 
- encryptions
List<GetBucket Encryption> 
- forceDestroy Boolean
- hierarchicalNamespaces List<GetBucket Hierarchical Namespace> 
- id String
- The provider-assigned unique ID for this managed resource.
- labels Map<String,String>
- lifecycleRules List<GetBucket Lifecycle Rule> 
- location String
- loggings
List<GetBucket Logging> 
- name String
- projectNumber Integer
- publicAccess StringPrevention 
- pulumiLabels Map<String,String>
- requesterPays Boolean
- retentionPolicies List<GetBucket Retention Policy> 
- rpo String
- selfLink String
- softDelete List<GetPolicies Bucket Soft Delete Policy> 
- storageClass String
- uniformBucket BooleanLevel Access 
- url String
- versionings
List<GetBucket Versioning> 
- websites
List<GetBucket Website> 
- project String
- autoclasses
GetBucket Autoclass[] 
- cors
GetBucket Cor[] 
- customPlacement GetConfigs Bucket Custom Placement Config[] 
- defaultEvent booleanBased Hold 
- effectiveLabels {[key: string]: string}
- enableObject booleanRetention 
- encryptions
GetBucket Encryption[] 
- forceDestroy boolean
- hierarchicalNamespaces GetBucket Hierarchical Namespace[] 
- id string
- The provider-assigned unique ID for this managed resource.
- labels {[key: string]: string}
- lifecycleRules GetBucket Lifecycle Rule[] 
- location string
- loggings
GetBucket Logging[] 
- name string
- projectNumber number
- publicAccess stringPrevention 
- pulumiLabels {[key: string]: string}
- requesterPays boolean
- retentionPolicies GetBucket Retention Policy[] 
- rpo string
- selfLink string
- softDelete GetPolicies Bucket Soft Delete Policy[] 
- storageClass string
- uniformBucket booleanLevel Access 
- url string
- versionings
GetBucket Versioning[] 
- websites
GetBucket Website[] 
- project string
- autoclasses
Sequence[GetBucket Autoclass] 
- cors
Sequence[GetBucket Cor] 
- custom_placement_ Sequence[Getconfigs Bucket Custom Placement Config] 
- default_event_ boolbased_ hold 
- effective_labels Mapping[str, str]
- enable_object_ boolretention 
- encryptions
Sequence[GetBucket Encryption] 
- force_destroy bool
- hierarchical_namespaces Sequence[GetBucket Hierarchical Namespace] 
- id str
- The provider-assigned unique ID for this managed resource.
- labels Mapping[str, str]
- lifecycle_rules Sequence[GetBucket Lifecycle Rule] 
- location str
- loggings
Sequence[GetBucket Logging] 
- name str
- project_number int
- public_access_ strprevention 
- pulumi_labels Mapping[str, str]
- requester_pays bool
- retention_policies Sequence[GetBucket Retention Policy] 
- rpo str
- self_link str
- soft_delete_ Sequence[Getpolicies Bucket Soft Delete Policy] 
- storage_class str
- uniform_bucket_ boollevel_ access 
- url str
- versionings
Sequence[GetBucket Versioning] 
- websites
Sequence[GetBucket Website] 
- project str
- autoclasses List<Property Map>
- cors List<Property Map>
- customPlacement List<Property Map>Configs 
- defaultEvent BooleanBased Hold 
- effectiveLabels Map<String>
- enableObject BooleanRetention 
- encryptions List<Property Map>
- forceDestroy Boolean
- hierarchicalNamespaces List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- labels Map<String>
- lifecycleRules List<Property Map>
- location String
- loggings List<Property Map>
- name String
- projectNumber Number
- publicAccess StringPrevention 
- pulumiLabels Map<String>
- requesterPays Boolean
- retentionPolicies List<Property Map>
- rpo String
- selfLink String
- softDelete List<Property Map>Policies 
- storageClass String
- uniformBucket BooleanLevel Access 
- url String
- versionings List<Property Map>
- websites List<Property Map>
- project String
Supporting Types
GetBucketAutoclass  
- Enabled bool
- While set to true, autoclass automatically transitions objects in your bucket to appropriate storage classes based on each object's access pattern.
- TerminalStorage stringClass 
- The storage class that objects in the bucket eventually transition to if they are not read for a certain length of time. Supported values include: NEARLINE, ARCHIVE.
- Enabled bool
- While set to true, autoclass automatically transitions objects in your bucket to appropriate storage classes based on each object's access pattern.
- TerminalStorage stringClass 
- The storage class that objects in the bucket eventually transition to if they are not read for a certain length of time. Supported values include: NEARLINE, ARCHIVE.
- enabled Boolean
- While set to true, autoclass automatically transitions objects in your bucket to appropriate storage classes based on each object's access pattern.
- terminalStorage StringClass 
- The storage class that objects in the bucket eventually transition to if they are not read for a certain length of time. Supported values include: NEARLINE, ARCHIVE.
- enabled boolean
- While set to true, autoclass automatically transitions objects in your bucket to appropriate storage classes based on each object's access pattern.
- terminalStorage stringClass 
- The storage class that objects in the bucket eventually transition to if they are not read for a certain length of time. Supported values include: NEARLINE, ARCHIVE.
- enabled bool
- While set to true, autoclass automatically transitions objects in your bucket to appropriate storage classes based on each object's access pattern.
- terminal_storage_ strclass 
- The storage class that objects in the bucket eventually transition to if they are not read for a certain length of time. Supported values include: NEARLINE, ARCHIVE.
- enabled Boolean
- While set to true, autoclass automatically transitions objects in your bucket to appropriate storage classes based on each object's access pattern.
- terminalStorage StringClass 
- The storage class that objects in the bucket eventually transition to if they are not read for a certain length of time. Supported values include: NEARLINE, ARCHIVE.
GetBucketCor  
- MaxAge intSeconds 
- The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses.
- Methods List<string>
- The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "any method".
- Origins List<string>
- The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin".
- ResponseHeaders List<string>
- The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains.
- MaxAge intSeconds 
- The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses.
- Methods []string
- The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "any method".
- Origins []string
- The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin".
- ResponseHeaders []string
- The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains.
- maxAge IntegerSeconds 
- The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses.
- methods List<String>
- The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "any method".
- origins List<String>
- The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin".
- responseHeaders List<String>
- The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains.
- maxAge numberSeconds 
- The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses.
- methods string[]
- The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "any method".
- origins string[]
- The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin".
- responseHeaders string[]
- The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains.
- max_age_ intseconds 
- The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses.
- methods Sequence[str]
- The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "any method".
- origins Sequence[str]
- The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin".
- response_headers Sequence[str]
- The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains.
- maxAge NumberSeconds 
- The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses.
- methods List<String>
- The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "any method".
- origins List<String>
- The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin".
- responseHeaders List<String>
- The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains.
GetBucketCustomPlacementConfig    
- DataLocations List<string>
- The list of individual regions that comprise a dual-region bucket. See the docs for a list of acceptable regions. Note: If any of the data_locations changes, it will recreate the bucket.
- DataLocations []string
- The list of individual regions that comprise a dual-region bucket. See the docs for a list of acceptable regions. Note: If any of the data_locations changes, it will recreate the bucket.
- dataLocations List<String>
- The list of individual regions that comprise a dual-region bucket. See the docs for a list of acceptable regions. Note: If any of the data_locations changes, it will recreate the bucket.
- dataLocations string[]
- The list of individual regions that comprise a dual-region bucket. See the docs for a list of acceptable regions. Note: If any of the data_locations changes, it will recreate the bucket.
- data_locations Sequence[str]
- The list of individual regions that comprise a dual-region bucket. See the docs for a list of acceptable regions. Note: If any of the data_locations changes, it will recreate the bucket.
- dataLocations List<String>
- The list of individual regions that comprise a dual-region bucket. See the docs for a list of acceptable regions. Note: If any of the data_locations changes, it will recreate the bucket.
GetBucketEncryption  
- DefaultKms stringKey Name 
- A Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified. You must pay attention to whether the crypto key is available in the location that this bucket is created in. See the docs for more details.
- DefaultKms stringKey Name 
- A Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified. You must pay attention to whether the crypto key is available in the location that this bucket is created in. See the docs for more details.
- defaultKms StringKey Name 
- A Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified. You must pay attention to whether the crypto key is available in the location that this bucket is created in. See the docs for more details.
- defaultKms stringKey Name 
- A Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified. You must pay attention to whether the crypto key is available in the location that this bucket is created in. See the docs for more details.
- default_kms_ strkey_ name 
- A Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified. You must pay attention to whether the crypto key is available in the location that this bucket is created in. See the docs for more details.
- defaultKms StringKey Name 
- A Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified. You must pay attention to whether the crypto key is available in the location that this bucket is created in. See the docs for more details.
GetBucketHierarchicalNamespace   
- Enabled bool
- Set this field true to organize bucket with logical file system structure.
- Enabled bool
- Set this field true to organize bucket with logical file system structure.
- enabled Boolean
- Set this field true to organize bucket with logical file system structure.
- enabled boolean
- Set this field true to organize bucket with logical file system structure.
- enabled bool
- Set this field true to organize bucket with logical file system structure.
- enabled Boolean
- Set this field true to organize bucket with logical file system structure.
GetBucketLifecycleRule   
- Actions
List<GetBucket Lifecycle Rule Action> 
- The Lifecycle Rule's action configuration. A single block of this type is supported.
- Conditions
List<GetBucket Lifecycle Rule Condition> 
- The Lifecycle Rule's condition configuration.
- Actions
[]GetBucket Lifecycle Rule Action 
- The Lifecycle Rule's action configuration. A single block of this type is supported.
- Conditions
[]GetBucket Lifecycle Rule Condition 
- The Lifecycle Rule's condition configuration.
- actions
List<GetBucket Lifecycle Rule Action> 
- The Lifecycle Rule's action configuration. A single block of this type is supported.
- conditions
List<GetBucket Lifecycle Rule Condition> 
- The Lifecycle Rule's condition configuration.
- actions
GetBucket Lifecycle Rule Action[] 
- The Lifecycle Rule's action configuration. A single block of this type is supported.
- conditions
GetBucket Lifecycle Rule Condition[] 
- The Lifecycle Rule's condition configuration.
- actions
Sequence[GetBucket Lifecycle Rule Action] 
- The Lifecycle Rule's action configuration. A single block of this type is supported.
- conditions
Sequence[GetBucket Lifecycle Rule Condition] 
- The Lifecycle Rule's condition configuration.
- actions List<Property Map>
- The Lifecycle Rule's action configuration. A single block of this type is supported.
- conditions List<Property Map>
- The Lifecycle Rule's condition configuration.
GetBucketLifecycleRuleAction    
- StorageClass string
- The target Storage Class of objects affected by this Lifecycle Rule. Supported values include: MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.
- Type string
- The type of the action of this Lifecycle Rule. Supported values include: Delete, SetStorageClass and AbortIncompleteMultipartUpload.
- StorageClass string
- The target Storage Class of objects affected by this Lifecycle Rule. Supported values include: MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.
- Type string
- The type of the action of this Lifecycle Rule. Supported values include: Delete, SetStorageClass and AbortIncompleteMultipartUpload.
- storageClass String
- The target Storage Class of objects affected by this Lifecycle Rule. Supported values include: MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.
- type String
- The type of the action of this Lifecycle Rule. Supported values include: Delete, SetStorageClass and AbortIncompleteMultipartUpload.
- storageClass string
- The target Storage Class of objects affected by this Lifecycle Rule. Supported values include: MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.
- type string
- The type of the action of this Lifecycle Rule. Supported values include: Delete, SetStorageClass and AbortIncompleteMultipartUpload.
- storage_class str
- The target Storage Class of objects affected by this Lifecycle Rule. Supported values include: MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.
- type str
- The type of the action of this Lifecycle Rule. Supported values include: Delete, SetStorageClass and AbortIncompleteMultipartUpload.
- storageClass String
- The target Storage Class of objects affected by this Lifecycle Rule. Supported values include: MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.
- type String
- The type of the action of this Lifecycle Rule. Supported values include: Delete, SetStorageClass and AbortIncompleteMultipartUpload.
GetBucketLifecycleRuleCondition    
- Age int
- Minimum age of an object in days to satisfy this condition.
- CreatedBefore string
- Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
- CustomTime stringBefore 
- Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
- DaysSince intCustom Time 
- Number of days elapsed since the user-specified timestamp set on an object.
- DaysSince intNoncurrent Time 
- Number of days elapsed since the noncurrent timestamp of an object. This condition is relevant only for versioned objects.
- MatchesPrefixes List<string>
- One or more matching name prefixes to satisfy this condition.
- MatchesStorage List<string>Classes 
- Storage Class of objects to satisfy this condition. Supported values include: MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, DURABLE_REDUCED_AVAILABILITY.
- MatchesSuffixes List<string>
- One or more matching name suffixes to satisfy this condition.
- NoncurrentTime stringBefore 
- Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
- NumNewer intVersions 
- Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.
- SendAge boolIf Zero 
- While set true, age value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the age field. It can be used alone or together with age.
- SendDays boolSince Custom Time If Zero 
- While set true, days_since_custom_time value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the days_since_custom_time field. It can be used alone or together with days_since_custom_time.
- SendDays boolSince Noncurrent Time If Zero 
- While set true, days_since_noncurrent_time value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the days_since_noncurrent_time field. It can be used alone or together with days_since_noncurrent_time.
- SendNum boolNewer Versions If Zero 
- While set true, num_newer_versions value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the num_newer_versions field. It can be used alone or together with num_newer_versions.
- WithState string
- Match to live and/or archived objects. Unversioned buckets have only live objects. Supported values include: "LIVE", "ARCHIVED", "ANY".
- Age int
- Minimum age of an object in days to satisfy this condition.
- CreatedBefore string
- Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
- CustomTime stringBefore 
- Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
- DaysSince intCustom Time 
- Number of days elapsed since the user-specified timestamp set on an object.
- DaysSince intNoncurrent Time 
- Number of days elapsed since the noncurrent timestamp of an object. This condition is relevant only for versioned objects.
- MatchesPrefixes []string
- One or more matching name prefixes to satisfy this condition.
- MatchesStorage []stringClasses 
- Storage Class of objects to satisfy this condition. Supported values include: MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, DURABLE_REDUCED_AVAILABILITY.
- MatchesSuffixes []string
- One or more matching name suffixes to satisfy this condition.
- NoncurrentTime stringBefore 
- Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
- NumNewer intVersions 
- Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.
- SendAge boolIf Zero 
- While set true, age value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the age field. It can be used alone or together with age.
- SendDays boolSince Custom Time If Zero 
- While set true, days_since_custom_time value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the days_since_custom_time field. It can be used alone or together with days_since_custom_time.
- SendDays boolSince Noncurrent Time If Zero 
- While set true, days_since_noncurrent_time value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the days_since_noncurrent_time field. It can be used alone or together with days_since_noncurrent_time.
- SendNum boolNewer Versions If Zero 
- While set true, num_newer_versions value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the num_newer_versions field. It can be used alone or together with num_newer_versions.
- WithState string
- Match to live and/or archived objects. Unversioned buckets have only live objects. Supported values include: "LIVE", "ARCHIVED", "ANY".
- age Integer
- Minimum age of an object in days to satisfy this condition.
- createdBefore String
- Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
- customTime StringBefore 
- Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
- daysSince IntegerCustom Time 
- Number of days elapsed since the user-specified timestamp set on an object.
- daysSince IntegerNoncurrent Time 
- Number of days elapsed since the noncurrent timestamp of an object. This condition is relevant only for versioned objects.
- matchesPrefixes List<String>
- One or more matching name prefixes to satisfy this condition.
- matchesStorage List<String>Classes 
- Storage Class of objects to satisfy this condition. Supported values include: MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, DURABLE_REDUCED_AVAILABILITY.
- matchesSuffixes List<String>
- One or more matching name suffixes to satisfy this condition.
- noncurrentTime StringBefore 
- Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
- numNewer IntegerVersions 
- Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.
- sendAge BooleanIf Zero 
- While set true, age value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the age field. It can be used alone or together with age.
- sendDays BooleanSince Custom Time If Zero 
- While set true, days_since_custom_time value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the days_since_custom_time field. It can be used alone or together with days_since_custom_time.
- sendDays BooleanSince Noncurrent Time If Zero 
- While set true, days_since_noncurrent_time value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the days_since_noncurrent_time field. It can be used alone or together with days_since_noncurrent_time.
- sendNum BooleanNewer Versions If Zero 
- While set true, num_newer_versions value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the num_newer_versions field. It can be used alone or together with num_newer_versions.
- withState String
- Match to live and/or archived objects. Unversioned buckets have only live objects. Supported values include: "LIVE", "ARCHIVED", "ANY".
- age number
- Minimum age of an object in days to satisfy this condition.
- createdBefore string
- Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
- customTime stringBefore 
- Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
- daysSince numberCustom Time 
- Number of days elapsed since the user-specified timestamp set on an object.
- daysSince numberNoncurrent Time 
- Number of days elapsed since the noncurrent timestamp of an object. This condition is relevant only for versioned objects.
- matchesPrefixes string[]
- One or more matching name prefixes to satisfy this condition.
- matchesStorage string[]Classes 
- Storage Class of objects to satisfy this condition. Supported values include: MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, DURABLE_REDUCED_AVAILABILITY.
- matchesSuffixes string[]
- One or more matching name suffixes to satisfy this condition.
- noncurrentTime stringBefore 
- Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
- numNewer numberVersions 
- Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.
- sendAge booleanIf Zero 
- While set true, age value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the age field. It can be used alone or together with age.
- sendDays booleanSince Custom Time If Zero 
- While set true, days_since_custom_time value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the days_since_custom_time field. It can be used alone or together with days_since_custom_time.
- sendDays booleanSince Noncurrent Time If Zero 
- While set true, days_since_noncurrent_time value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the days_since_noncurrent_time field. It can be used alone or together with days_since_noncurrent_time.
- sendNum booleanNewer Versions If Zero 
- While set true, num_newer_versions value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the num_newer_versions field. It can be used alone or together with num_newer_versions.
- withState string
- Match to live and/or archived objects. Unversioned buckets have only live objects. Supported values include: "LIVE", "ARCHIVED", "ANY".
- age int
- Minimum age of an object in days to satisfy this condition.
- created_before str
- Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
- custom_time_ strbefore 
- Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
- days_since_ intcustom_ time 
- Number of days elapsed since the user-specified timestamp set on an object.
- days_since_ intnoncurrent_ time 
- Number of days elapsed since the noncurrent timestamp of an object. This condition is relevant only for versioned objects.
- matches_prefixes Sequence[str]
- One or more matching name prefixes to satisfy this condition.
- matches_storage_ Sequence[str]classes 
- Storage Class of objects to satisfy this condition. Supported values include: MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, DURABLE_REDUCED_AVAILABILITY.
- matches_suffixes Sequence[str]
- One or more matching name suffixes to satisfy this condition.
- noncurrent_time_ strbefore 
- Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
- num_newer_ intversions 
- Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.
- send_age_ boolif_ zero 
- While set true, age value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the age field. It can be used alone or together with age.
- send_days_ boolsince_ custom_ time_ if_ zero 
- While set true, days_since_custom_time value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the days_since_custom_time field. It can be used alone or together with days_since_custom_time.
- send_days_ boolsince_ noncurrent_ time_ if_ zero 
- While set true, days_since_noncurrent_time value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the days_since_noncurrent_time field. It can be used alone or together with days_since_noncurrent_time.
- send_num_ boolnewer_ versions_ if_ zero 
- While set true, num_newer_versions value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the num_newer_versions field. It can be used alone or together with num_newer_versions.
- with_state str
- Match to live and/or archived objects. Unversioned buckets have only live objects. Supported values include: "LIVE", "ARCHIVED", "ANY".
- age Number
- Minimum age of an object in days to satisfy this condition.
- createdBefore String
- Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
- customTime StringBefore 
- Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
- daysSince NumberCustom Time 
- Number of days elapsed since the user-specified timestamp set on an object.
- daysSince NumberNoncurrent Time 
- Number of days elapsed since the noncurrent timestamp of an object. This condition is relevant only for versioned objects.
- matchesPrefixes List<String>
- One or more matching name prefixes to satisfy this condition.
- matchesStorage List<String>Classes 
- Storage Class of objects to satisfy this condition. Supported values include: MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, DURABLE_REDUCED_AVAILABILITY.
- matchesSuffixes List<String>
- One or more matching name suffixes to satisfy this condition.
- noncurrentTime StringBefore 
- Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
- numNewer NumberVersions 
- Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.
- sendAge BooleanIf Zero 
- While set true, age value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the age field. It can be used alone or together with age.
- sendDays BooleanSince Custom Time If Zero 
- While set true, days_since_custom_time value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the days_since_custom_time field. It can be used alone or together with days_since_custom_time.
- sendDays BooleanSince Noncurrent Time If Zero 
- While set true, days_since_noncurrent_time value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the days_since_noncurrent_time field. It can be used alone or together with days_since_noncurrent_time.
- sendNum BooleanNewer Versions If Zero 
- While set true, num_newer_versions value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the num_newer_versions field. It can be used alone or together with num_newer_versions.
- withState String
- Match to live and/or archived objects. Unversioned buckets have only live objects. Supported values include: "LIVE", "ARCHIVED", "ANY".
GetBucketLogging  
- LogBucket string
- The bucket that will receive log objects.
- LogObject stringPrefix 
- The object prefix for log objects. If it's not provided, by default Google Cloud Storage sets this to this bucket's name.
- LogBucket string
- The bucket that will receive log objects.
- LogObject stringPrefix 
- The object prefix for log objects. If it's not provided, by default Google Cloud Storage sets this to this bucket's name.
- logBucket String
- The bucket that will receive log objects.
- logObject StringPrefix 
- The object prefix for log objects. If it's not provided, by default Google Cloud Storage sets this to this bucket's name.
- logBucket string
- The bucket that will receive log objects.
- logObject stringPrefix 
- The object prefix for log objects. If it's not provided, by default Google Cloud Storage sets this to this bucket's name.
- log_bucket str
- The bucket that will receive log objects.
- log_object_ strprefix 
- The object prefix for log objects. If it's not provided, by default Google Cloud Storage sets this to this bucket's name.
- logBucket String
- The bucket that will receive log objects.
- logObject StringPrefix 
- The object prefix for log objects. If it's not provided, by default Google Cloud Storage sets this to this bucket's name.
GetBucketRetentionPolicy   
- IsLocked bool
- If set to true, the bucket will be locked and permanently restrict edits to the bucket's retention policy. Caution: Locking a bucket is an irreversible action.
- RetentionPeriod int
- The period of time, in seconds, that objects in the bucket must be retained and cannot be deleted, overwritten, or archived. The value must be less than 3,155,760,000 seconds.
- IsLocked bool
- If set to true, the bucket will be locked and permanently restrict edits to the bucket's retention policy. Caution: Locking a bucket is an irreversible action.
- RetentionPeriod int
- The period of time, in seconds, that objects in the bucket must be retained and cannot be deleted, overwritten, or archived. The value must be less than 3,155,760,000 seconds.
- isLocked Boolean
- If set to true, the bucket will be locked and permanently restrict edits to the bucket's retention policy. Caution: Locking a bucket is an irreversible action.
- retentionPeriod Integer
- The period of time, in seconds, that objects in the bucket must be retained and cannot be deleted, overwritten, or archived. The value must be less than 3,155,760,000 seconds.
- isLocked boolean
- If set to true, the bucket will be locked and permanently restrict edits to the bucket's retention policy. Caution: Locking a bucket is an irreversible action.
- retentionPeriod number
- The period of time, in seconds, that objects in the bucket must be retained and cannot be deleted, overwritten, or archived. The value must be less than 3,155,760,000 seconds.
- is_locked bool
- If set to true, the bucket will be locked and permanently restrict edits to the bucket's retention policy. Caution: Locking a bucket is an irreversible action.
- retention_period int
- The period of time, in seconds, that objects in the bucket must be retained and cannot be deleted, overwritten, or archived. The value must be less than 3,155,760,000 seconds.
- isLocked Boolean
- If set to true, the bucket will be locked and permanently restrict edits to the bucket's retention policy. Caution: Locking a bucket is an irreversible action.
- retentionPeriod Number
- The period of time, in seconds, that objects in the bucket must be retained and cannot be deleted, overwritten, or archived. The value must be less than 3,155,760,000 seconds.
GetBucketSoftDeletePolicy    
- EffectiveTime string
- Server-determined value that indicates the time from which the policy, or one with a greater retention, was effective. This value is in RFC 3339 format.
- RetentionDuration intSeconds 
- The duration in seconds that soft-deleted objects in the bucket will be retained and cannot be permanently deleted. Default value is 604800.
- EffectiveTime string
- Server-determined value that indicates the time from which the policy, or one with a greater retention, was effective. This value is in RFC 3339 format.
- RetentionDuration intSeconds 
- The duration in seconds that soft-deleted objects in the bucket will be retained and cannot be permanently deleted. Default value is 604800.
- effectiveTime String
- Server-determined value that indicates the time from which the policy, or one with a greater retention, was effective. This value is in RFC 3339 format.
- retentionDuration IntegerSeconds 
- The duration in seconds that soft-deleted objects in the bucket will be retained and cannot be permanently deleted. Default value is 604800.
- effectiveTime string
- Server-determined value that indicates the time from which the policy, or one with a greater retention, was effective. This value is in RFC 3339 format.
- retentionDuration numberSeconds 
- The duration in seconds that soft-deleted objects in the bucket will be retained and cannot be permanently deleted. Default value is 604800.
- effective_time str
- Server-determined value that indicates the time from which the policy, or one with a greater retention, was effective. This value is in RFC 3339 format.
- retention_duration_ intseconds 
- The duration in seconds that soft-deleted objects in the bucket will be retained and cannot be permanently deleted. Default value is 604800.
- effectiveTime String
- Server-determined value that indicates the time from which the policy, or one with a greater retention, was effective. This value is in RFC 3339 format.
- retentionDuration NumberSeconds 
- The duration in seconds that soft-deleted objects in the bucket will be retained and cannot be permanently deleted. Default value is 604800.
GetBucketVersioning  
- Enabled bool
- While set to true, versioning is fully enabled for this bucket.
- Enabled bool
- While set to true, versioning is fully enabled for this bucket.
- enabled Boolean
- While set to true, versioning is fully enabled for this bucket.
- enabled boolean
- While set to true, versioning is fully enabled for this bucket.
- enabled bool
- While set to true, versioning is fully enabled for this bucket.
- enabled Boolean
- While set to true, versioning is fully enabled for this bucket.
GetBucketWebsite  
- MainPage stringSuffix 
- Behaves as the bucket's directory index where missing objects are treated as potential directories.
- NotFound stringPage 
- The custom object to return when a requested resource is not found.
- MainPage stringSuffix 
- Behaves as the bucket's directory index where missing objects are treated as potential directories.
- NotFound stringPage 
- The custom object to return when a requested resource is not found.
- mainPage StringSuffix 
- Behaves as the bucket's directory index where missing objects are treated as potential directories.
- notFound StringPage 
- The custom object to return when a requested resource is not found.
- mainPage stringSuffix 
- Behaves as the bucket's directory index where missing objects are treated as potential directories.
- notFound stringPage 
- The custom object to return when a requested resource is not found.
- main_page_ strsuffix 
- Behaves as the bucket's directory index where missing objects are treated as potential directories.
- not_found_ strpage 
- The custom object to return when a requested resource is not found.
- mainPage StringSuffix 
- Behaves as the bucket's directory index where missing objects are treated as potential directories.
- notFound StringPage 
- The custom object to return when a requested resource is not found.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the google-betaTerraform Provider.