1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. storage
  5. getBucket
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

gcp.storage.getBucket

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

    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/v7/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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gcp:storage/getBucket:getBucket
      arguments:
        # arguments dictionary

    The 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, the provider project is used. If no value is supplied in the configuration or through provider defaults 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. Supplying a value for project doesn't influence retrieving data about the bucket but it can be used to prevent use of the Compute API. If you do provide a project value 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, the provider project is used. If no value is supplied in the configuration or through provider defaults 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. Supplying a value for project doesn't influence retrieving data about the bucket but it can be used to prevent use of the Compute API. If you do provide a project value 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, the provider project is used. If no value is supplied in the configuration or through provider defaults 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. Supplying a value for project doesn't influence retrieving data about the bucket but it can be used to prevent use of the Compute API. If you do provide a project value 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, the provider project is used. If no value is supplied in the configuration or through provider defaults 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. Supplying a value for project doesn't influence retrieving data about the bucket but it can be used to prevent use of the Compute API. If you do provide a project value 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, the provider project is used. If no value is supplied in the configuration or through provider defaults 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. Supplying a value for project doesn't influence retrieving data about the bucket but it can be used to prevent use of the Compute API. If you do provide a project value 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, the provider project is used. If no value is supplied in the configuration or through provider defaults 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. Supplying a value for project doesn't influence retrieving data about the bucket but it can be used to prevent use of the Compute API. If you do provide a project value 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<GetBucketAutoclass>
    Cors List<GetBucketCor>
    CustomPlacementConfigs List<GetBucketCustomPlacementConfig>
    DefaultEventBasedHold bool
    EffectiveLabels Dictionary<string, string>
    EnableObjectRetention bool
    Encryptions List<GetBucketEncryption>
    ForceDestroy bool
    Id string
    The provider-assigned unique ID for this managed resource.
    Labels Dictionary<string, string>
    LifecycleRules List<GetBucketLifecycleRule>
    Location string
    Loggings List<GetBucketLogging>
    Name string
    ProjectNumber int
    PublicAccessPrevention string
    PulumiLabels Dictionary<string, string>
    RequesterPays bool
    RetentionPolicies List<GetBucketRetentionPolicy>
    Rpo string
    SelfLink string
    SoftDeletePolicies List<GetBucketSoftDeletePolicy>
    StorageClass string
    UniformBucketLevelAccess bool
    Url string
    Versionings List<GetBucketVersioning>
    Websites List<GetBucketWebsite>
    Project string
    autoclasses List<GetBucketAutoclass>
    cors List<GetBucketCor>
    customPlacementConfigs List<GetBucketCustomPlacementConfig>
    defaultEventBasedHold Boolean
    effectiveLabels Map<String,String>
    enableObjectRetention Boolean
    encryptions List<GetBucketEncryption>
    forceDestroy Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    labels Map<String,String>
    lifecycleRules List<GetBucketLifecycleRule>
    location String
    loggings List<GetBucketLogging>
    name String
    projectNumber Integer
    publicAccessPrevention String
    pulumiLabels Map<String,String>
    requesterPays Boolean
    retentionPolicies List<GetBucketRetentionPolicy>
    rpo String
    selfLink String
    softDeletePolicies List<GetBucketSoftDeletePolicy>
    storageClass String
    uniformBucketLevelAccess Boolean
    url String
    versionings List<GetBucketVersioning>
    websites List<GetBucketWebsite>
    project String
    autoclasses GetBucketAutoclass[]
    cors GetBucketCor[]
    customPlacementConfigs GetBucketCustomPlacementConfig[]
    defaultEventBasedHold boolean
    effectiveLabels {[key: string]: string}
    enableObjectRetention boolean
    encryptions GetBucketEncryption[]
    forceDestroy boolean
    id string
    The provider-assigned unique ID for this managed resource.
    labels {[key: string]: string}
    lifecycleRules GetBucketLifecycleRule[]
    location string
    loggings GetBucketLogging[]
    name string
    projectNumber number
    publicAccessPrevention string
    pulumiLabels {[key: string]: string}
    requesterPays boolean
    retentionPolicies GetBucketRetentionPolicy[]
    rpo string
    selfLink string
    softDeletePolicies GetBucketSoftDeletePolicy[]
    storageClass string
    uniformBucketLevelAccess boolean
    url string
    versionings GetBucketVersioning[]
    websites GetBucketWebsite[]
    project string
    autoclasses Sequence[GetBucketAutoclass]
    cors Sequence[GetBucketCor]
    custom_placement_configs Sequence[GetBucketCustomPlacementConfig]
    default_event_based_hold bool
    effective_labels Mapping[str, str]
    enable_object_retention bool
    encryptions Sequence[GetBucketEncryption]
    force_destroy bool
    id str
    The provider-assigned unique ID for this managed resource.
    labels Mapping[str, str]
    lifecycle_rules Sequence[GetBucketLifecycleRule]
    location str
    loggings Sequence[GetBucketLogging]
    name str
    project_number int
    public_access_prevention str
    pulumi_labels Mapping[str, str]
    requester_pays bool
    retention_policies Sequence[GetBucketRetentionPolicy]
    rpo str
    self_link str
    soft_delete_policies Sequence[GetBucketSoftDeletePolicy]
    storage_class str
    uniform_bucket_level_access bool
    url str
    versionings Sequence[GetBucketVersioning]
    websites Sequence[GetBucketWebsite]
    project str

    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.
    TerminalStorageClass string
    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.
    TerminalStorageClass string
    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.
    terminalStorageClass String
    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.
    terminalStorageClass string
    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_class str
    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.
    terminalStorageClass String
    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

    MaxAgeSeconds int
    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.
    MaxAgeSeconds int
    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.
    maxAgeSeconds Integer
    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.
    maxAgeSeconds number
    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_seconds int
    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.
    maxAgeSeconds Number
    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

    DefaultKmsKeyName string
    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.
    DefaultKmsKeyName string
    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.
    defaultKmsKeyName String
    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.
    defaultKmsKeyName string
    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_key_name str
    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.
    defaultKmsKeyName String
    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.

    GetBucketLifecycleRule

    Actions List<GetBucketLifecycleRuleAction>
    The Lifecycle Rule's action configuration. A single block of this type is supported.
    Conditions List<GetBucketLifecycleRuleCondition>
    The Lifecycle Rule's condition configuration.
    Actions []GetBucketLifecycleRuleAction
    The Lifecycle Rule's action configuration. A single block of this type is supported.
    Conditions []GetBucketLifecycleRuleCondition
    The Lifecycle Rule's condition configuration.
    actions List<GetBucketLifecycleRuleAction>
    The Lifecycle Rule's action configuration. A single block of this type is supported.
    conditions List<GetBucketLifecycleRuleCondition>
    The Lifecycle Rule's condition configuration.
    actions GetBucketLifecycleRuleAction[]
    The Lifecycle Rule's action configuration. A single block of this type is supported.
    conditions GetBucketLifecycleRuleCondition[]
    The Lifecycle Rule's condition configuration.
    actions Sequence[GetBucketLifecycleRuleAction]
    The Lifecycle Rule's action configuration. A single block of this type is supported.
    conditions Sequence[GetBucketLifecycleRuleCondition]
    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.
    CustomTimeBefore string
    Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
    DaysSinceCustomTime int
    Number of days elapsed since the user-specified timestamp set on an object.
    DaysSinceNoncurrentTime int
    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.
    MatchesStorageClasses List<string>
    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.
    NoAge bool
    While set true, age value will be omitted.Required to set true when age is unset in the config file.
    NoncurrentTimeBefore string
    Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
    NumNewerVersions int
    Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.
    SendDaysSinceCustomTimeIfZero bool
    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.
    SendDaysSinceNoncurrentTimeIfZero bool
    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.
    SendNumNewerVersionsIfZero bool
    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.
    CustomTimeBefore string
    Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
    DaysSinceCustomTime int
    Number of days elapsed since the user-specified timestamp set on an object.
    DaysSinceNoncurrentTime int
    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.
    MatchesStorageClasses []string
    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.
    NoAge bool
    While set true, age value will be omitted.Required to set true when age is unset in the config file.
    NoncurrentTimeBefore string
    Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
    NumNewerVersions int
    Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.
    SendDaysSinceCustomTimeIfZero bool
    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.
    SendDaysSinceNoncurrentTimeIfZero bool
    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.
    SendNumNewerVersionsIfZero bool
    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.
    customTimeBefore String
    Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
    daysSinceCustomTime Integer
    Number of days elapsed since the user-specified timestamp set on an object.
    daysSinceNoncurrentTime Integer
    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.
    matchesStorageClasses List<String>
    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.
    noAge Boolean
    While set true, age value will be omitted.Required to set true when age is unset in the config file.
    noncurrentTimeBefore String
    Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
    numNewerVersions Integer
    Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.
    sendDaysSinceCustomTimeIfZero Boolean
    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.
    sendDaysSinceNoncurrentTimeIfZero Boolean
    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.
    sendNumNewerVersionsIfZero Boolean
    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.
    customTimeBefore string
    Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
    daysSinceCustomTime number
    Number of days elapsed since the user-specified timestamp set on an object.
    daysSinceNoncurrentTime number
    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.
    matchesStorageClasses string[]
    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.
    noAge boolean
    While set true, age value will be omitted.Required to set true when age is unset in the config file.
    noncurrentTimeBefore string
    Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
    numNewerVersions number
    Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.
    sendDaysSinceCustomTimeIfZero boolean
    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.
    sendDaysSinceNoncurrentTimeIfZero boolean
    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.
    sendNumNewerVersionsIfZero boolean
    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_before str
    Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
    days_since_custom_time int
    Number of days elapsed since the user-specified timestamp set on an object.
    days_since_noncurrent_time int
    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_classes Sequence[str]
    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.
    no_age bool
    While set true, age value will be omitted.Required to set true when age is unset in the config file.
    noncurrent_time_before str
    Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
    num_newer_versions int
    Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.
    send_days_since_custom_time_if_zero bool
    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_since_noncurrent_time_if_zero bool
    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_newer_versions_if_zero bool
    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.
    customTimeBefore String
    Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
    daysSinceCustomTime Number
    Number of days elapsed since the user-specified timestamp set on an object.
    daysSinceNoncurrentTime Number
    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.
    matchesStorageClasses List<String>
    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.
    noAge Boolean
    While set true, age value will be omitted.Required to set true when age is unset in the config file.
    noncurrentTimeBefore String
    Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
    numNewerVersions Number
    Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.
    sendDaysSinceCustomTimeIfZero Boolean
    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.
    sendDaysSinceNoncurrentTimeIfZero Boolean
    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.
    sendNumNewerVersionsIfZero Boolean
    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.
    LogObjectPrefix string
    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.
    LogObjectPrefix string
    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.
    logObjectPrefix String
    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.
    logObjectPrefix string
    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_prefix str
    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.
    logObjectPrefix String
    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.
    RetentionDurationSeconds int
    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.
    RetentionDurationSeconds int
    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.
    retentionDurationSeconds Integer
    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.
    retentionDurationSeconds number
    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_seconds int
    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.
    retentionDurationSeconds Number
    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

    MainPageSuffix string
    Behaves as the bucket's directory index where missing objects are treated as potential directories.
    NotFoundPage string
    The custom object to return when a requested resource is not found.
    MainPageSuffix string
    Behaves as the bucket's directory index where missing objects are treated as potential directories.
    NotFoundPage string
    The custom object to return when a requested resource is not found.
    mainPageSuffix String
    Behaves as the bucket's directory index where missing objects are treated as potential directories.
    notFoundPage String
    The custom object to return when a requested resource is not found.
    mainPageSuffix string
    Behaves as the bucket's directory index where missing objects are treated as potential directories.
    notFoundPage string
    The custom object to return when a requested resource is not found.
    main_page_suffix str
    Behaves as the bucket's directory index where missing objects are treated as potential directories.
    not_found_page str
    The custom object to return when a requested resource is not found.
    mainPageSuffix String
    Behaves as the bucket's directory index where missing objects are treated as potential directories.
    notFoundPage String
    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-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi