Skip to main content

Retrieving the Data Source

This data source can be retrieved by one of ID or name.
Retrieve by ID
To retrieve by ID, fill in only the id field:
data ... {
    id = "your-ID"
}
Retrieve by Name
To retrieve by name, fill in only the name and parent_id fields:
data ... {
    name      = "your name"
    parent_id = "data-source-parent-id"
}

Schema

Optional

  • id (String) Identifier for the resource, unique for its resource type.
  • name (String) Human readable name for the resource.
  • parent_id (String) Identifier of the parent resource to which the resource belongs.

Read-Only

  • bucket_policy (Attributes) : Bucket policy specifies granular permissions for a bucket.

    Inner value description

    Bucket policy specifies granular permissions for a bucket. (see below for nested schema)
  • cors (Attributes) : Cross-origin resource sharing configuration.

    Inner value description

    Cross-origin resource sharing (CORS) configuration. (see below for nested schema)
  • created_at (String) : Timestamp indicating when the resource was created. A string representing a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS.SSS±HH:MM
  • default_storage_class (String) : Storage class to use by default for uploads to the bucket. It may be overridden by x-amz-storage-class header. If not set - STANDARD is used as a default storage class.

    Supported values

    Possible values:
    • STORAGE_CLASS_UNSPECIFIED
    • STANDARD
    • ENHANCED_THROUGHPUT
    • INTELLIGENT_TIERING
  • force_storage_class (Boolean) Flag to force usage of default_storage_class, ignoring x-amz-storage-class header.
  • labels (Map of String) : Labels associated with the resource.
  • lifecycle_configuration (Attributes) :

    Inner value description

    The lifecycle configuration consists of one or more rules. An Lifecycle configuration can have up to 1,000 rules. Each rule consists of the following:
    • A filter identifying a subset of objects to which the rule applies. The filter can be based on a key name prefix, object size, or any combination of these.
    • A status indicating whether the rule is currently active.
    • One or more lifecycle expiration actions that you want to be performed on the objects identified by the filter. If the state of your bucket is versioning-enabled or versioning-suspended (bucket.spec.versioning_policy equals to ENABLED or SUSPENDED) you can have many versions of the same object (one current version and zero or more noncurrent versions). The system provides predefined actions that you can specify for current and noncurrent object versions. (see below for nested schema)
  • max_size_bytes (Number) : Maximum bucket size. Zero means unlimited. Actual limit can be lower if customer doesn’t have enough quota. Real bucket size can go a little higher if customer writes too fast.
  • metadata (Attributes) :

    Inner value description

    Common resource metadata. (see below for nested schema)
  • object_audit_logging (String) : Object audit logging specifies which requests must be logged - none, all or mutational only.

    Supported values

    Possible values:
    • OBJECT_AUDIT_LOGGING_UNSPECIFIED
    • NONE - Logging is disabled.
    • MUTATE_ONLY - Logging enabled only for mutating requests.
    • ALL - Logging enabled for all requests.
  • override_storage_class (String, Deprecated) : Storage class to override any other storage class of uploading objects. It overrides the storage class regardless of how the original storage class was specified - either the default storage class or the one provided via the x-amz-storage-class header.

    Supported values

    Possible values:
    • STORAGE_CLASS_UNSPECIFIED
    • STANDARD
    • ENHANCED_THROUGHPUT
    • INTELLIGENT_TIERING
  • resource_version (Number) : Version of the resource for safe concurrent modifications and consistent reads. Positive and monotonically increases on each resource spec change (but not on each change of the resource’s container(s) or status). Service allows zero value or current.
  • status (Attributes) (see below for nested schema)
  • updated_at (String) : Timestamp indicating when the resource was last updated. A string representing a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS.SSS±HH:MM
  • versioning_policy (String) : Supports transitions:
    • disabled -> enabled
    • disabled -> suspended
    • enabled <-> suspended

    Supported values

    Possible values:
    • VERSIONING_POLICY_UNSPECIFIED
    • DISABLED
    • ENABLED
    • SUSPENDED

Nested Schema for bucket_policy

Read-Only:
  • rules (Attributes List) : Rule specifies which role must be given to a subject to access a set of objects with given prefixes or a whole bucket. (see below for nested schema)

Nested Schema for bucket_policy.rules

Read-Only:
  • anonymous (Attributes) : Enable anonymous access. Only read-only roles are allowed in anonymous mode. Cannot be set alongside group_id. (see below for nested schema)
  • group_id (String) : Group ID to grant access to. Cannot be set alongside anonymous.
  • paths (List of String) : A list of paths each of which is either a full object key or a prefix ending with a single "" wildcard character. A rule is only applied to objects matching any of paths. If there is a path equal to "", a rule applies to a whole bucket.
  • roles (List of String) A set of roles which a subject will have. All storage.* roles are supported.

Nested Schema for bucket_policy.rules.anonymous

Nested Schema for cors

Read-Only:

Nested Schema for cors.rules

Read-Only:
  • allowed_headers (List of String) Headers that are allowed in a preflight request through the Access-Control-Request-Headers header
  • allowed_methods (List of String) HTTP methods CORS is allowed for: GET, PUT, POST, DELETE, HEAD.
  • allowed_origins (List of String) The origins that you want to allow cross-domain requests from. Single wildcard * is allowed.
  • expose_headers (List of String) Headers in the response that you want customers to be able to access from their applications.
  • id (String) Optional rule identifier.
  • max_age_seconds (Number) Time in seconds that your browser can cache the response for a preflight request as identified by the resource.

Nested Schema for lifecycle_configuration

Read-Only:
  • last_access_filter (Attributes) : Specifies which requests are included in days_since_last_access calculations for all transition rules.

    Inner value description

    Specifies which requests are included in days_since_last_access calculations. (see below for nested schema)
  • rules (Attributes List) (see below for nested schema)

Nested Schema for lifecycle_configuration.last_access_filter

Read-Only:
  • conditions (Attributes List) : A request is included in days_since_last_access calculations if:
    • The first condition matching the request has INCLUDE type. OR
    • The request doesn’t match any conditions (see below for nested schema)

Nested Schema for lifecycle_configuration.last_access_filter.conditions

Read-Only:
  • methods (List of String) : The s3 methods to match. An empty list matches all methods

    Supported values

    Possible values:
    • METHOD_UNSPECIFIED
    • GET_OBJECT
    • HEAD_OBJECT
    • GET_OBJECT_TAGGING
    • COPY_OBJECT: Copy object method reads the source object. We account for those operations as source object accesses when calculating days_since_last_access for source object.
    • UPLOAD_PART_COPY: Upload part copy method reads the source object. We account for those operations as source object accesses when calculating days_since_last_access for source object.
  • type (String) :

    Supported values

    Possible values:
    • TYPE_UNSPECIFIED
    • INCLUDE: If an include type condition is the first condition that the request match, the request will be included in days_since_last_access calculation.
    • EXCLUDE: If an exclude type condition is the first condition that the request match, the request will be ignored in days_since_last_access calculation.
  • user_agents (List of String) : User agents to match. Condition is satisfied if the request’s user agent contains any of these substrings. An empty list matches all user agents.

Nested Schema for lifecycle_configuration.rules

Read-Only:
  • abort_incomplete_multipart_upload (Attributes) : Specifies the days since the initiation of an incomplete multipart upload that the system will wait before permanently removing all parts of the upload. (see below for nested schema)
  • expiration (Attributes) : Specifies the expiration for the lifecycle of the object in the form of date, days and, whether the object has a delete marker. (see below for nested schema)
  • filter (Attributes) : The Filter is used to identify objects that a Lifecycle Rule applies to. The Lifecycle Rule will apply to any object matching all of the predicates configured inside (using logical AND). (see below for nested schema)
  • id (String) : Unique identifier for the rule per configuration. The value cannot be longer than 255 characters.
  • noncurrent_version_expiration (Attributes) : Specifies when noncurrent object versions expire. It works only on a bucket that has versioning enabled (or suspended). (see below for nested schema)
  • noncurrent_version_transition (Attributes) : Specifies the transition for the lifecycle of a noncurrent object. It works only on a bucket that has versioning enabled (or suspended). (see below for nested schema)
  • status (String) :

    Supported values

    Possible values:
    • STATUS_UNSPECIFIED
    • ENABLED
    • DISABLED
  • transition (Attributes) : Specifies the transition for the lifecycle of an object in the form of date or days and target storage class to transit object to. (see below for nested schema)

Nested Schema for lifecycle_configuration.rules.abort_incomplete_multipart_upload

Read-Only:
  • days_after_initiation (Number) : Specifies the days since the initiation of an incomplete multipart upload that the system will wait before permanently removing all parts of the upload.

Nested Schema for lifecycle_configuration.rules.expiration

Read-Only:
  • date (String) : Indicates at what date the object will be deleted. The time is always midnight UTC. A string representing a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS.SSS±HH:MM Cannot be set alongside days.
  • days (Number) : Indicates the lifetime, in days, of the objects that are subject to the rule. The value must be a non-zero positive integer. Cannot be set alongside date.
  • expired_object_delete_marker (Boolean) : Indicates whether the system will remove a “delete marker” with no noncurrent versions. If set to true, the “delete marker” will be permanently removed. If set to false the policy takes no action. This cannot be specified with Days or Date in a LifecycleExpiration Policy.

Nested Schema for lifecycle_configuration.rules.filter

Read-Only:
  • object_size_greater_than_bytes (Number) Minimum object size to which the rule applies.
  • object_size_less_than_bytes (Number) Maximum object size to which the rule applies.
  • prefix (String) : Prefix identifying one or more objects to which the rule applies. If prefix is empty, the rule applies to all objects in the bucket.

Nested Schema for lifecycle_configuration.rules.noncurrent_version_expiration

Read-Only:
  • newer_noncurrent_versions (Number) Specifies how many noncurrent versions the system will retain.
  • noncurrent_days (Number) Specifies the number of days an object is noncurrent before the system will expire it.

Nested Schema for lifecycle_configuration.rules.noncurrent_version_transition

Read-Only:
  • newer_noncurrent_versions (Number) Specifies how many noncurrent versions the system will retain without transition.
  • noncurrent_days (Number) Specifies the number of days an object is noncurrent before the system will transit it.
  • storage_class (String) : Target storage class to transit to.

    Supported values

    Possible values:
    • STORAGE_CLASS_UNSPECIFIED
    • STANDARD
    • ENHANCED_THROUGHPUT
    • INTELLIGENT_TIERING

Nested Schema for lifecycle_configuration.rules.transition

Read-Only:
  • date (String) : Indicates at what date the object will be transited. The time is always midnight UTC. A string representing a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS.SSS±HH:MM Cannot be set alongside days or days_since_last_access.
  • days (Number) : Amount of days since object was uploaded before it’s transited to a new storage class. The value must be a non-zero positive integer. Cannot be set alongside date or days_since_last_access.
  • days_since_last_access (Number) : The number of days since the object was last accessed before it is transitioned. Cannot be set alongside date or days.
  • storage_class (String) : Target storage class to transit to.

    Supported values

    Possible values:
    • STORAGE_CLASS_UNSPECIFIED
    • STANDARD
    • ENHANCED_THROUGHPUT
    • INTELLIGENT_TIERING

Nested Schema for metadata

Nested Schema for status

Read-Only:
  • anonymous_access_enabled (Boolean) : Indicator flag showing whether the bucket has any BucketPolicy rule that grants anonymous access to any object, prefix, or the entire bucket.
  • counters (Attributes List) (see below for nested schema)
  • deleted_at (String) : The time when the bucket was deleted (or scheduled for deletion). It resets to null if the bucket is undeleted. A string representing a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS.SSS±HH:MM
  • domain_name (String) : The domain of the endpoint where the bucket can be accessed. It omits the scheme (HTTPS) and the port (443) and contains only the FQDN address.
  • purge_at (String) : The time when the bucket will be automatically purged in case it was soft-deleted. A string representing a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS.SSS±HH:MM
  • region (String) The name of the region where the bucket is located for use with S3 clients, i.e. “eu-west1”.
  • state (String) :

    Supported values

    Possible values:
    • STATE_UNSPECIFIED
    • CREATING - Bucket is under creation and cannot be used yet.
    • ACTIVE - Bucket is active and ready for usage.
    • UPDATING: Bucket is being updated. It can be used, but some settings are being modified and you can observe their inconsistency.
    • SCHEDULED_FOR_DELETION: Bucket is scheduled for deletion. It cannot be used in s3 api anymore.
  • suspension_state (String) :

    Supported values

    Possible values:
    • SUSPENSION_STATE_UNSPECIFIED
    • NOT_SUSPENDED
    • SUSPENDED

Nested Schema for status.counters

Read-Only:
  • counters (Attributes) (see below for nested schema)
  • non_current_counters (Attributes) :

    Inner value description

    Counters for non-current object versions (for versioning buckets). (see below for nested schema)
  • storage_class (String) :

    Supported values

    Possible values:
    • STORAGE_CLASS_UNSPECIFIED
    • STANDARD
    • ENHANCED_THROUGHPUT
    • INTELLIGENT_TIERING

Nested Schema for status.counters.counters

Read-Only:
  • inflight_parts_quantity (Number)
  • inflight_parts_size (Number)
  • multipart_objects_quantity (Number)
  • multipart_objects_size (Number)
  • multipart_uploads_quantity (Number)
  • simple_objects_quantity (Number)
  • simple_objects_size (Number)

Nested Schema for status.counters.non_current_counters

Read-Only:
  • multipart_objects_quantity (Number)
  • multipart_objects_size (Number)
  • simple_objects_quantity (Number)
  • simple_objects_size (Number)