Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/google/cloud/storage/constants.py: 100%
18 statements
« prev ^ index » next coverage.py v7.3.1, created at 2023-09-25 06:17 +0000
« prev ^ index » next coverage.py v7.3.1, created at 2023-09-25 06:17 +0000
1# Copyright 2019 Google LLC
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
15"""Constants used across google.cloud.storage modules.
17See [Python Storage Client Constants Page](https://github.com/googleapis/python-storage/blob/main/google/cloud/storage/constants.py)
18for constants used across storage classes, location types, public access prevention, etc.
20"""
22# Storage classes
24STANDARD_STORAGE_CLASS = "STANDARD"
25"""Storage class for objects accessed more than once per month.
27See: https://cloud.google.com/storage/docs/storage-classes
28"""
30NEARLINE_STORAGE_CLASS = "NEARLINE"
31"""Storage class for objects accessed at most once per month.
33See: https://cloud.google.com/storage/docs/storage-classes
34"""
36COLDLINE_STORAGE_CLASS = "COLDLINE"
37"""Storage class for objects accessed at most once per year.
39See: https://cloud.google.com/storage/docs/storage-classes
40"""
42ARCHIVE_STORAGE_CLASS = "ARCHIVE"
43"""Storage class for objects accessed less frequently than once per year.
45See: https://cloud.google.com/storage/docs/storage-classes
46"""
48MULTI_REGIONAL_LEGACY_STORAGE_CLASS = "MULTI_REGIONAL"
49"""Legacy storage class.
51Alias for :attr:`STANDARD_STORAGE_CLASS`.
53Can only be used for objects in buckets whose
54:attr:`~google.cloud.storage.bucket.Bucket.location_type` is
55:attr:`~google.cloud.storage.bucket.Bucket.MULTI_REGION_LOCATION_TYPE`.
57See: https://cloud.google.com/storage/docs/storage-classes
58"""
60REGIONAL_LEGACY_STORAGE_CLASS = "REGIONAL"
61"""Legacy storage class.
63Alias for :attr:`STANDARD_STORAGE_CLASS`.
65Can only be used for objects in buckets whose
66:attr:`~google.cloud.storage.bucket.Bucket.location_type` is
67:attr:`~google.cloud.storage.bucket.Bucket.REGION_LOCATION_TYPE`.
69See: https://cloud.google.com/storage/docs/storage-classes
70"""
72DURABLE_REDUCED_AVAILABILITY_LEGACY_STORAGE_CLASS = "DURABLE_REDUCED_AVAILABILITY"
73"""Legacy storage class.
75Similar to :attr:`NEARLINE_STORAGE_CLASS`.
76"""
79# Location types
81MULTI_REGION_LOCATION_TYPE = "multi-region"
82"""Location type: data will be replicated across regions in a multi-region.
84Provides highest availability across largest area.
85"""
87REGION_LOCATION_TYPE = "region"
88"""Location type: data will be stored within a single region.
90Provides lowest latency within a single region.
91"""
93DUAL_REGION_LOCATION_TYPE = "dual-region"
94"""Location type: data will be stored within two primary regions.
96Provides high availability and low latency across two regions.
97"""
100# Internal constants
102_DEFAULT_TIMEOUT = 60 # in seconds
103"""The default request timeout in seconds if a timeout is not explicitly given.
104"""
106# Public Access Prevention
107PUBLIC_ACCESS_PREVENTION_ENFORCED = "enforced"
108"""Enforced public access prevention value.
110See: https://cloud.google.com/storage/docs/public-access-prevention
111"""
113PUBLIC_ACCESS_PREVENTION_UNSPECIFIED = "unspecified"
114"""Unspecified public access prevention value.
116DEPRECATED: Use 'PUBLIC_ACCESS_PREVENTION_INHERITED' instead.
118See: https://cloud.google.com/storage/docs/public-access-prevention
119"""
121PUBLIC_ACCESS_PREVENTION_INHERITED = "inherited"
122"""Inherited public access prevention value.
124See: https://cloud.google.com/storage/docs/public-access-prevention
125"""
127RPO_ASYNC_TURBO = "ASYNC_TURBO"
128"""The recovery point objective (RPO) indicates how quickly newly written objects are asynchronously replicated to a separate geographic location.
129When the RPO value is set to ASYNC_TURBO, the turbo replication feature is enabled.
131See: https://cloud.google.com/storage/docs/managing-turbo-replication
132"""
134RPO_DEFAULT = "DEFAULT"
135"""The recovery point objective (RPO) indicates how quickly newly written objects are asynchronously replicated to a separate geographic location.
136When the RPO value is set to DEFAULT, the default replication behavior is enabled.
138See: https://cloud.google.com/storage/docs/managing-turbo-replication
139"""