StorageControlClient(
*,
credentials: typing.Optional[google.auth.credentials.Credentials] = None,
transport: typing.Optional[
typing.Union[
str,
google.cloud.storage_control_v2.services.storage_control.transports.base.StorageControlTransport,
typing.Callable[
[...],
google.cloud.storage_control_v2.services.storage_control.transports.base.StorageControlTransport,
],
]
] = None,
client_options: typing.Optional[
typing.Union[google.api_core.client_options.ClientOptions, dict]
] = None,
client_info: google.api_core.gapic_v1.client_info.ClientInfo = google.api_core.gapic_v1.client_info.ClientInfo
)StorageControl service includes selected control plane operations.
Properties
api_endpoint
Return the API endpoint used by the client instance.
| Returns | |
|---|---|
| Type | Description |
str |
The API endpoint used by the client instance. |
transport
Returns the transport used by the client instance.
| Returns | |
|---|---|
| Type | Description |
StorageControlTransport |
The transport used by the client instance. |
universe_domain
Return the universe domain used by the client instance.
| Returns | |
|---|---|
| Type | Description |
str |
The universe domain used by the client instance. |
Methods
StorageControlClient
StorageControlClient(
*,
credentials: typing.Optional[google.auth.credentials.Credentials] = None,
transport: typing.Optional[
typing.Union[
str,
google.cloud.storage_control_v2.services.storage_control.transports.base.StorageControlTransport,
typing.Callable[
[...],
google.cloud.storage_control_v2.services.storage_control.transports.base.StorageControlTransport,
],
]
] = None,
client_options: typing.Optional[
typing.Union[google.api_core.client_options.ClientOptions, dict]
] = None,
client_info: google.api_core.gapic_v1.client_info.ClientInfo = google.api_core.gapic_v1.client_info.ClientInfo
)Instantiates the storage control client.
| Parameters | |
|---|---|
| Name | Description |
credentials |
Optional[google.auth.credentials.Credentials]
The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment. |
transport |
Optional[Union[str,StorageControlTransport,Callable[..., StorageControlTransport]]]
The transport to use, or a Callable that constructs and returns a new transport. If a Callable is given, it will be called with the same set of initialization arguments as used in the StorageControlTransport constructor. If set to None, a transport is chosen automatically. |
client_options |
Optional[Union[google.api_core.client_options.ClientOptions, dict]]
Custom options for the client. 1. The |
client_info |
google.api_core.gapic_v1.client_info.ClientInfo
The client info used to send a user-agent string along with API requests. If |
| Exceptions | |
|---|---|
| Type | Description |
google.auth.exceptions.MutualTLSChannelError |
If mutual TLS transport creation failed for any reason. |
__exit__
__exit__(type, value, traceback)Releases underlying transport's resources.
anywhere_cache_path
anywhere_cache_path(project: str, bucket: str, anywhere_cache: str) -> strReturns a fully-qualified anywhere_cache string.
bucket_path
bucket_path(project: str, bucket: str) -> strReturns a fully-qualified bucket string.
common_billing_account_path
common_billing_account_path(billing_account: str) -> strReturns a fully-qualified billing_account string.
common_folder_path
common_folder_path(folder: str) -> strReturns a fully-qualified folder string.
common_location_path
common_location_path(project: str, location: str) -> strReturns a fully-qualified location string.
common_organization_path
common_organization_path(organization: str) -> strReturns a fully-qualified organization string.
common_project_path
common_project_path(project: str) -> strReturns a fully-qualified project string.
create_anywhere_cache
create_anywhere_cache(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.CreateAnywhereCacheRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
anywhere_cache: typing.Optional[
google.cloud.storage_control_v2.types.storage_control.AnywhereCache
] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.OperationCreates an Anywhere Cache instance.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_create_anywhere_cache():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.CreateAnywhereCacheRequest(
parent="parent_value",
)
# Make the request
operation = client.create_anywhere_cache(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.CreateAnywhereCacheRequest, dict]
The request object. Request message for CreateAnywhereCache. |
parent |
str
Required. The bucket to which this cache belongs. Format: |
anywhere_cache |
google.cloud.storage_control_v2.types.AnywhereCache
Required. Properties of the Anywhere Cache instance being created. The parent bucket name is specified in the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation.Operation |
An object representing a long-running operation. The result type for the operation will be AnywhereCache An Anywhere Cache Instance. |
create_folder
create_folder(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.CreateFolderRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
folder: typing.Optional[
google.cloud.storage_control_v2.types.storage_control.Folder
] = None,
folder_id: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.storage_control_v2.types.storage_control.FolderCreates a new folder. This operation is only applicable to a hierarchical namespace enabled bucket.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_create_folder():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.CreateFolderRequest(
parent="parent_value",
folder_id="folder_id_value",
)
# Make the request
response = client.create_folder(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.CreateFolderRequest, dict]
The request object. Request message for CreateFolder. This operation is only applicable to a hierarchical namespace enabled bucket. |
parent |
str
Required. Name of the bucket in which the folder will reside. The bucket must be a hierarchical namespace enabled bucket. This corresponds to the |
folder |
google.cloud.storage_control_v2.types.Folder
Required. Properties of the new folder being created. The bucket and name of the folder are specified in the parent and folder_id fields, respectively. Populating those fields in |
folder_id |
str
Required. The full name of a folder, including all its parent folders. Folders use single '/' characters as a delimiter. The folder_id must end with a slash. For example, the folder_id of "books/biographies/" would create a new "biographies/" folder under the "books/" folder. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.types.Folder |
A folder resource. This resource can only exist in a hierarchical namespace enabled bucket. |
create_managed_folder
create_managed_folder(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.CreateManagedFolderRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
managed_folder: typing.Optional[
google.cloud.storage_control_v2.types.storage_control.ManagedFolder
] = None,
managed_folder_id: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.storage_control_v2.types.storage_control.ManagedFolderCreates a new managed folder.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_create_managed_folder():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.CreateManagedFolderRequest(
parent="parent_value",
managed_folder_id="managed_folder_id_value",
)
# Make the request
response = client.create_managed_folder(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.CreateManagedFolderRequest, dict]
The request object. Request message for CreateManagedFolder. |
parent |
str
Required. Name of the bucket this managed folder belongs to. This corresponds to the |
managed_folder |
google.cloud.storage_control_v2.types.ManagedFolder
Required. Properties of the managed folder being created. The bucket and managed folder names are specified in the |
managed_folder_id |
str
Required. The name of the managed folder. It uses a single |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.types.ManagedFolder |
A managed folder. |
create_rapid_cache
create_rapid_cache(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.CreateRapidCacheRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
rapid_cache: typing.Optional[
google.cloud.storage_control_v2.types.storage_control.RapidCache
] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.OperationCreates a Rapid Cache instance.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_create_rapid_cache():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.CreateRapidCacheRequest(
parent="parent_value",
)
# Make the request
operation = client.create_rapid_cache(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.CreateRapidCacheRequest, dict]
The request object. Request message for CreateRapidCache. |
parent |
str
Required. The bucket to which this cache belongs. Format: |
rapid_cache |
google.cloud.storage_control_v2.types.RapidCache
Required. The RapidCache to create. Default values for ingest_on_write, ttl and admission_policy will be applied if not specified in the request. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation.Operation |
An object representing a long-running operation. The result type for the operation will be RapidCache A Rapid Cache Instance. |
delete_folder
delete_folder(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.DeleteFolderRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> NonePermanently deletes an empty folder. This operation is only applicable to a hierarchical namespace enabled bucket.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_delete_folder():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.DeleteFolderRequest(
name="name_value",
)
# Make the request
client.delete_folder(request=request)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.DeleteFolderRequest, dict]
The request object. Request message for DeleteFolder. This operation is only applicable to a hierarchical namespace enabled bucket. |
name |
str
Required. Name of the folder. Format: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
delete_folder_recursive
delete_folder_recursive(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.DeleteFolderRecursiveRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.OperationDeletes a folder recursively. This operation is only applicable to a hierarchical namespace enabled bucket.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_delete_folder_recursive():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.DeleteFolderRecursiveRequest(
name="name_value",
)
# Make the request
operation = client.delete_folder_recursive(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.DeleteFolderRecursiveRequest, dict]
The request object. Request message for DeleteFolderRecursive. |
name |
str
Required. Name of the folder being deleted, however all of its contents will be deleted too. Format: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation.Operation |
An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
delete_managed_folder
delete_managed_folder(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.DeleteManagedFolderRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> NonePermanently deletes an empty managed folder.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_delete_managed_folder():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.DeleteManagedFolderRequest(
name="name_value",
)
# Make the request
client.delete_managed_folder(request=request)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.DeleteManagedFolderRequest, dict]
The request object. DeleteManagedFolder RPC request message. |
name |
str
Required. Name of the managed folder. Format: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
disable_anywhere_cache
disable_anywhere_cache(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.DisableAnywhereCacheRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.storage_control_v2.types.storage_control.AnywhereCacheDisables an Anywhere Cache instance. A disabled instance is read-only. The disablement could be revoked by calling ResumeAnywhereCache. The cache instance will be deleted automatically if it remains in the disabled state for at least one hour.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_disable_anywhere_cache():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.DisableAnywhereCacheRequest(
name="name_value",
)
# Make the request
response = client.disable_anywhere_cache(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.DisableAnywhereCacheRequest, dict]
The request object. Request message for DisableAnywhereCache. |
name |
str
Required. The name field in the request should be: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.types.AnywhereCache |
An Anywhere Cache Instance. |
folder_path
folder_path(project: str, bucket: str, folder: str) -> strReturns a fully-qualified folder string.
from_service_account_file
from_service_account_file(filename: str, *args, **kwargs)Creates an instance of this client using the provided credentials file.
| Parameter | |
|---|---|
| Name | Description |
filename |
str
The path to the service account private key json file. |
| Returns | |
|---|---|
| Type | Description |
StorageControlClient |
The constructed client. |
from_service_account_info
from_service_account_info(info: dict, *args, **kwargs)Creates an instance of this client using the provided credentials info.
| Parameter | |
|---|---|
| Name | Description |
info |
dict
The service account private key info. |
| Returns | |
|---|---|
| Type | Description |
StorageControlClient |
The constructed client. |
from_service_account_json
from_service_account_json(filename: str, *args, **kwargs)Creates an instance of this client using the provided credentials file.
| Parameter | |
|---|---|
| Name | Description |
filename |
str
The path to the service account private key json file. |
| Returns | |
|---|---|
| Type | Description |
StorageControlClient |
The constructed client. |
get_anywhere_cache
get_anywhere_cache(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.GetAnywhereCacheRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.storage_control_v2.types.storage_control.AnywhereCacheGets an Anywhere Cache instance.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_get_anywhere_cache():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.GetAnywhereCacheRequest(
name="name_value",
)
# Make the request
response = client.get_anywhere_cache(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.GetAnywhereCacheRequest, dict]
The request object. Request message for GetAnywhereCache. |
name |
str
Required. The name field in the request should be: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.types.AnywhereCache |
An Anywhere Cache Instance. |
get_folder
get_folder(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.GetFolderRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.storage_control_v2.types.storage_control.FolderReturns metadata for the specified folder. This operation is only applicable to a hierarchical namespace enabled bucket.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_get_folder():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.GetFolderRequest(
name="name_value",
)
# Make the request
response = client.get_folder(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.GetFolderRequest, dict]
The request object. Request message for GetFolder. This operation is only applicable to a hierarchical namespace enabled bucket. |
name |
str
Required. Name of the folder. Format: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.types.Folder |
A folder resource. This resource can only exist in a hierarchical namespace enabled bucket. |
get_folder_intelligence_config
get_folder_intelligence_config(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.GetFolderIntelligenceConfigRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.storage_control_v2.types.storage_control.IntelligenceConfigReturns the Folder scoped singleton IntelligenceConfig resource.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_get_folder_intelligence_config():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.GetFolderIntelligenceConfigRequest(
name="name_value",
)
# Make the request
response = client.get_folder_intelligence_config(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.GetFolderIntelligenceConfigRequest, dict]
The request object. Request message to get the |
name |
str
Required. The name of the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.types.IntelligenceConfig |
The IntelligenceConfig resource associated with your organization, folder, or project. |
get_iam_policy
get_iam_policy(
request: typing.Optional[
typing.Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]
] = None,
*,
resource: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.iam.v1.policy_pb2.PolicyGets the IAM policy for a specified bucket. The resource
field in the request should be projects/_/buckets/{bucket}
for a bucket, or
projects/_/buckets/{bucket}/managedFolders/{managedFolder}
for a managed folder.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
import google.iam.v1.iam_policy_pb2 as iam_policy_pb2 # type: ignore
def sample_get_iam_policy():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = iam_policy_pb2.GetIamPolicyRequest(
resource="resource_value",
)
# Make the request
response = client.get_iam_policy(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]
The request object. Request message for |
resource |
str
REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.iam.v1.policy_pb2.Policy |
An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A Policy is a collection of bindings. A binding binds one or more members, or principals, to a single role. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions; each role can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a binding can also specify a condition, which is a logical expression that allows access to a resource only if the expression evaluates to true. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** :literal: { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01t00:00:00.000z')",="" }="" }="" ],="" "etag":="" "bwwwja0yfja=", " version":="" 3="">\ \ **YAML example:** :literal: bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01t00:00:00.000z')="" etag:="" bwwwja0yfja="version:">\ \ For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). |
get_intelligence_finding
get_intelligence_finding(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.GetIntelligenceFindingRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.storage_control_v2.types.storage_control.IntelligenceFindingGets the IntelligenceFinding for a project.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_get_intelligence_finding():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.GetIntelligenceFindingRequest(
name="name_value",
)
# Make the request
response = client.get_intelligence_finding(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.GetIntelligenceFindingRequest, dict]
The request object. Request message to get the |
name |
str
Required. The name of the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.types.IntelligenceFinding |
The IntelligenceFinding resource that represents a security, performance, or cost-related finding about a project or bucket. |
get_intelligence_finding_revision
get_intelligence_finding_revision(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.GetIntelligenceFindingRevisionRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.storage_control_v2.types.storage_control.IntelligenceFindingRevisionGets the IntelligenceFindingRevision resource.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_get_intelligence_finding_revision():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.GetIntelligenceFindingRevisionRequest(
name="name_value",
)
# Make the request
response = client.get_intelligence_finding_revision(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.GetIntelligenceFindingRevisionRequest, dict]
The request object. Request message to get the |
name |
str
Required. The name of the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.types.IntelligenceFindingRevision |
An IntelligenceFindingRevision represents a specific revision of an IntelligenceFinding resource. |
get_managed_folder
get_managed_folder(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.GetManagedFolderRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.storage_control_v2.types.storage_control.ManagedFolderReturns metadata for the specified managed folder.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_get_managed_folder():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.GetManagedFolderRequest(
name="name_value",
)
# Make the request
response = client.get_managed_folder(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.GetManagedFolderRequest, dict]
The request object. Request message for GetManagedFolder. |
name |
str
Required. Name of the managed folder. Format: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.types.ManagedFolder |
A managed folder. |
get_mtls_endpoint_and_cert_source
get_mtls_endpoint_and_cert_source(
client_options: typing.Optional[
google.api_core.client_options.ClientOptions
] = None,
)Deprecated. Return the API endpoint and client cert source for mutual TLS.
The client cert source is determined in the following order:
(1) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is not "true", the
client cert source is None.
(2) if client_options.client_cert_source is provided, use the provided one; if the
default client cert source exists, use the default one; otherwise the client cert
source is None.
The API endpoint is determined in the following order:
(1) if client_options.api_endpoint if provided, use the provided one.
(2) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is "always", use the
default mTLS endpoint; if the environment variable is "never", use the default API
endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise
use the default API endpoint.
More details can be found at https://google.aip.dev/auth/4114.
| Parameter | |
|---|---|
| Name | Description |
client_options |
google.api_core.client_options.ClientOptions
Custom options for the client. Only the |
| Exceptions | |
|---|---|
| Type | Description |
google.auth.exceptions.MutualTLSChannelError |
If any errors happen. |
| Returns | |
|---|---|
| Type | Description |
Tuple[str, Callable[[], Tuple[bytes, bytes]]] |
returns the API endpoint and the client cert source to use. |
get_organization_intelligence_config
get_organization_intelligence_config(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.GetOrganizationIntelligenceConfigRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.storage_control_v2.types.storage_control.IntelligenceConfigReturns the Organization scoped singleton IntelligenceConfig resource.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_get_organization_intelligence_config():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.GetOrganizationIntelligenceConfigRequest(
name="name_value",
)
# Make the request
response = client.get_organization_intelligence_config(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.GetOrganizationIntelligenceConfigRequest, dict]
The request object. Request message to get the |
name |
str
Required. The name of the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.types.IntelligenceConfig |
The IntelligenceConfig resource associated with your organization, folder, or project. |
get_project_intelligence_config
get_project_intelligence_config(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.GetProjectIntelligenceConfigRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.storage_control_v2.types.storage_control.IntelligenceConfigReturns the Project scoped singleton IntelligenceConfig resource.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_get_project_intelligence_config():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.GetProjectIntelligenceConfigRequest(
name="name_value",
)
# Make the request
response = client.get_project_intelligence_config(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.GetProjectIntelligenceConfigRequest, dict]
The request object. Request message to get the |
name |
str
Required. The name of the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.types.IntelligenceConfig |
The IntelligenceConfig resource associated with your organization, folder, or project. |
get_rapid_cache
get_rapid_cache(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.GetRapidCacheRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.storage_control_v2.types.storage_control.RapidCacheGets a Rapid Cache instance.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_get_rapid_cache():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.GetRapidCacheRequest(
name="name_value",
)
# Make the request
response = client.get_rapid_cache(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.GetRapidCacheRequest, dict]
The request object. Request message for GetRapidCache. |
name |
str
Required. The name field in the request should be: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.types.RapidCache |
A Rapid Cache Instance. |
get_storage_layout
get_storage_layout(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.GetStorageLayoutRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.storage_control_v2.types.storage_control.StorageLayoutReturns the storage layout configuration for a given bucket.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_get_storage_layout():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.GetStorageLayoutRequest(
name="name_value",
)
# Make the request
response = client.get_storage_layout(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.GetStorageLayoutRequest, dict]
The request object. Request message for GetStorageLayout. |
name |
str
Required. The name of the StorageLayout resource. Format: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.types.StorageLayout |
The storage layout configuration of a bucket. |
intelligence_config_path
intelligence_config_path(folder: str, location: str) -> strReturns a fully-qualified intelligence_config string.
intelligence_finding_path
intelligence_finding_path(
project: str, location: str, intelligence_finding: str
) -> strReturns a fully-qualified intelligence_finding string.
intelligence_finding_revision_path
intelligence_finding_revision_path(
project: str, location: str, intelligence_finding: str, revision: str
) -> strReturns a fully-qualified intelligence_finding_revision string.
list_anywhere_caches
list_anywhere_caches(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.ListAnywhereCachesRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.storage_control_v2.services.storage_control.pagers.ListAnywhereCachesPager
)Lists Anywhere Cache instances for a given bucket.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_list_anywhere_caches():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.ListAnywhereCachesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_anywhere_caches(request=request)
# Handle the response
for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.ListAnywhereCachesRequest, dict]
The request object. Request message for ListAnywhereCaches. |
parent |
str
Required. The bucket to which this cache belongs. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.services.storage_control.pagers.ListAnywhereCachesPager |
Response message for ListAnywhereCaches. Iterating over this object will yield results and resolve additional pages automatically. |
list_folders
list_folders(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.ListFoldersRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.storage_control_v2.services.storage_control.pagers.ListFoldersPagerRetrieves a list of folders. This operation is only applicable to a hierarchical namespace enabled bucket.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_list_folders():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.ListFoldersRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_folders(request=request)
# Handle the response
for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.ListFoldersRequest, dict]
The request object. Request message for ListFolders. This operation is only applicable to a hierarchical namespace enabled bucket. |
parent |
str
Required. Name of the bucket in which to look for folders. The bucket must be a hierarchical namespace enabled bucket. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.services.storage_control.pagers.ListFoldersPager |
Response message for ListFolders. Iterating over this object will yield results and resolve additional pages automatically. |
list_intelligence_finding_revisions
list_intelligence_finding_revisions(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.ListIntelligenceFindingRevisionsRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.storage_control_v2.services.storage_control.pagers.ListIntelligenceFindingRevisionsPager
)Lists all the revisions of an IntelligenceFinding resource.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_list_intelligence_finding_revisions():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.ListIntelligenceFindingRevisionsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_intelligence_finding_revisions(request=request)
# Handle the response
for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.ListIntelligenceFindingRevisionsRequest, dict]
The request object. Request message to list |
parent |
str
Required. The parent of the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.services.storage_control.pagers.ListIntelligenceFindingRevisionsPager |
Response message to list IntelligenceFindingRevision resources associated with a project. Iterating over this object will yield results and resolve additional pages automatically. |
list_intelligence_findings
list_intelligence_findings(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.ListIntelligenceFindingsRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.storage_control_v2.services.storage_control.pagers.ListIntelligenceFindingsPager
)Lists the IntelligenceFinding resources for the specified
the project.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_list_intelligence_findings():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.ListIntelligenceFindingsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_intelligence_findings(request=request)
# Handle the response
for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.ListIntelligenceFindingsRequest, dict]
The request object. Request message to list |
parent |
str
Required. The parent of the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.services.storage_control.pagers.ListIntelligenceFindingsPager |
Response message to list the IntelligenceFinding resources associated with a project. Iterating over this object will yield results and resolve additional pages automatically. |
list_managed_folders
list_managed_folders(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.ListManagedFoldersRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.storage_control_v2.services.storage_control.pagers.ListManagedFoldersPager
)Retrieves a list of managed folders for a given bucket.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_list_managed_folders():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.ListManagedFoldersRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_managed_folders(request=request)
# Handle the response
for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.ListManagedFoldersRequest, dict]
The request object. Request message for ListManagedFolders. |
parent |
str
Required. Name of the bucket this managed folder belongs to. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.services.storage_control.pagers.ListManagedFoldersPager |
Response message for ListManagedFolders. Iterating over this object will yield results and resolve additional pages automatically. |
list_rapid_caches
list_rapid_caches(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.ListRapidCachesRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.storage_control_v2.services.storage_control.pagers.ListRapidCachesPager
)Lists Rapid Cache instances for a given bucket.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_list_rapid_caches():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.ListRapidCachesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_rapid_caches(request=request)
# Handle the response
for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.ListRapidCachesRequest, dict]
The request object. Request message for ListRapidCaches. |
parent |
str
Required. The bucket to which this cache belongs. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.services.storage_control.pagers.ListRapidCachesPager |
Response message for ListRapidCaches. Iterating over this object will yield results and resolve additional pages automatically. |
managed_folder_path
managed_folder_path(project: str, bucket: str, managed_folder: str) -> strReturns a fully-qualified managed_folder string.
object_path
object_path(project: str, bucket: str, object: str) -> strReturns a fully-qualified object string.
parse_anywhere_cache_path
parse_anywhere_cache_path(path: str) -> typing.Dict[str, str]Parses a anywhere_cache path into its component segments.
parse_bucket_path
parse_bucket_path(path: str) -> typing.Dict[str, str]Parses a bucket path into its component segments.
parse_common_billing_account_path
parse_common_billing_account_path(path: str) -> typing.Dict[str, str]Parse a billing_account path into its component segments.
parse_common_folder_path
parse_common_folder_path(path: str) -> typing.Dict[str, str]Parse a folder path into its component segments.
parse_common_location_path
parse_common_location_path(path: str) -> typing.Dict[str, str]Parse a location path into its component segments.
parse_common_organization_path
parse_common_organization_path(path: str) -> typing.Dict[str, str]Parse a organization path into its component segments.
parse_common_project_path
parse_common_project_path(path: str) -> typing.Dict[str, str]Parse a project path into its component segments.
parse_folder_path
parse_folder_path(path: str) -> typing.Dict[str, str]Parses a folder path into its component segments.
parse_intelligence_config_path
parse_intelligence_config_path(path: str) -> typing.Dict[str, str]Parses a intelligence_config path into its component segments.
parse_intelligence_finding_path
parse_intelligence_finding_path(path: str) -> typing.Dict[str, str]Parses a intelligence_finding path into its component segments.
parse_intelligence_finding_revision_path
parse_intelligence_finding_revision_path(path: str) -> typing.Dict[str, str]Parses a intelligence_finding_revision path into its component segments.
parse_managed_folder_path
parse_managed_folder_path(path: str) -> typing.Dict[str, str]Parses a managed_folder path into its component segments.
parse_object_path
parse_object_path(path: str) -> typing.Dict[str, str]Parses a object path into its component segments.
parse_rapid_cache_path
parse_rapid_cache_path(path: str) -> typing.Dict[str, str]Parses a rapid_cache path into its component segments.
parse_storage_layout_path
parse_storage_layout_path(path: str) -> typing.Dict[str, str]Parses a storage_layout path into its component segments.
pause_anywhere_cache
pause_anywhere_cache(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.PauseAnywhereCacheRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.storage_control_v2.types.storage_control.AnywhereCachePauses an Anywhere Cache instance.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_pause_anywhere_cache():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.PauseAnywhereCacheRequest(
name="name_value",
)
# Make the request
response = client.pause_anywhere_cache(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.PauseAnywhereCacheRequest, dict]
The request object. Request message for PauseAnywhereCache. |
name |
str
Required. The name field in the request should be: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.types.AnywhereCache |
An Anywhere Cache Instance. |
rapid_cache_path
rapid_cache_path(project: str, bucket: str, rapid_cache: str) -> strReturns a fully-qualified rapid_cache string.
rename_folder
rename_folder(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.RenameFolderRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
destination_folder_id: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.OperationRenames a source folder to a destination folder. This operation is only applicable to a hierarchical namespace enabled bucket. During a rename, the source and destination folders are locked until the long running operation completes.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_rename_folder():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.RenameFolderRequest(
name="name_value",
destination_folder_id="destination_folder_id_value",
)
# Make the request
operation = client.rename_folder(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.RenameFolderRequest, dict]
The request object. Request message for RenameFolder. This operation is only applicable to a hierarchical namespace enabled bucket. |
name |
str
Required. Name of the source folder being renamed. Format: |
destination_folder_id |
str
Required. The destination folder ID, e.g. |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation.Operation |
An object representing a long-running operation. The result type for the operation will be Folder A folder resource. This resource can only exist in a hierarchical namespace enabled bucket. |
resume_anywhere_cache
resume_anywhere_cache(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.ResumeAnywhereCacheRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.storage_control_v2.types.storage_control.AnywhereCacheResumes a disabled or paused Anywhere Cache instance.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_resume_anywhere_cache():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.ResumeAnywhereCacheRequest(
name="name_value",
)
# Make the request
response = client.resume_anywhere_cache(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.ResumeAnywhereCacheRequest, dict]
The request object. Request message for ResumeAnywhereCache. |
name |
str
Required. The name field in the request should be: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.types.AnywhereCache |
An Anywhere Cache Instance. |
set_iam_policy
set_iam_policy(
request: typing.Optional[
typing.Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]
] = None,
*,
resource: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.iam.v1.policy_pb2.PolicyUpdates an IAM policy for the specified bucket. The resource
field in the request should be projects/_/buckets/{bucket}
for a bucket, or
projects/_/buckets/{bucket}/managedFolders/{managedFolder}
for a managed folder.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
import google.iam.v1.iam_policy_pb2 as iam_policy_pb2 # type: ignore
def sample_set_iam_policy():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = iam_policy_pb2.SetIamPolicyRequest(
resource="resource_value",
)
# Make the request
response = client.set_iam_policy(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]
The request object. Request message for |
resource |
str
REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.iam.v1.policy_pb2.Policy |
An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A Policy is a collection of bindings. A binding binds one or more members, or principals, to a single role. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions; each role can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a binding can also specify a condition, which is a logical expression that allows access to a resource only if the expression evaluates to true. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** :literal: { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01t00:00:00.000z')",="" }="" }="" ],="" "etag":="" "bwwwja0yfja=", " version":="" 3="">\ \ **YAML example:** :literal: bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01t00:00:00.000z')="" etag:="" bwwwja0yfja="version:">\ \ For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). |
storage_layout_path
storage_layout_path(project: str, bucket: str) -> strReturns a fully-qualified storage_layout string.
summarize_intelligence_findings
summarize_intelligence_findings(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.SummarizeIntelligenceFindingsRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.storage_control_v2.services.storage_control.pagers.SummarizeIntelligenceFindingsPager
)Summarizes the intelligence findings for the specified scope (organization, folder or project).
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_summarize_intelligence_findings():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.SummarizeIntelligenceFindingsRequest(
parent="parent_value",
)
# Make the request
page_result = client.summarize_intelligence_findings(request=request)
# Handle the response
for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.SummarizeIntelligenceFindingsRequest, dict]
The request object. Request message to summarize the intelligence findings for the specified scope (organization, folder or project). |
parent |
str
Required. The scope to summarize the findings for. Format: - |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.services.storage_control.pagers.SummarizeIntelligenceFindingsPager |
Response message to summarize the intelligence findings for a specified scope (organization, folder or project). Iterating over this object will yield results and resolve additional pages automatically. |
test_iam_permissions
test_iam_permissions(
request: typing.Optional[
typing.Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]
] = None,
*,
resource: typing.Optional[str] = None,
permissions: typing.Optional[typing.MutableSequence[str]] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.iam.v1.iam_policy_pb2.TestIamPermissionsResponseTests a set of permissions on the given bucket, object, or
managed folder to see which, if any, are held by the caller. The
resource field in the request should be
projects/_/buckets/{bucket} for a bucket,
projects/_/buckets/{bucket}/objects/{object} for an object,
or
projects/_/buckets/{bucket}/managedFolders/{managedFolder}
for a managed folder.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
import google.iam.v1.iam_policy_pb2 as iam_policy_pb2 # type: ignore
def sample_test_iam_permissions():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = iam_policy_pb2.TestIamPermissionsRequest(
resource="resource_value",
permissions=['permissions_value1', 'permissions_value2'],
)
# Make the request
response = client.test_iam_permissions(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]
The request object. Request message for |
resource |
str
REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. This corresponds to the |
permissions |
MutableSequence[str]
The set of permissions to check for the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse |
Response message for TestIamPermissions method. |
update_anywhere_cache
update_anywhere_cache(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.UpdateAnywhereCacheRequest,
dict,
]
] = None,
*,
anywhere_cache: typing.Optional[
google.cloud.storage_control_v2.types.storage_control.AnywhereCache
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.OperationUpdates an Anywhere Cache instance. Mutable fields include
ttl and admission_policy.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_update_anywhere_cache():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.UpdateAnywhereCacheRequest(
)
# Make the request
operation = client.update_anywhere_cache(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.UpdateAnywhereCacheRequest, dict]
The request object. Request message for UpdateAnywhereCache. |
anywhere_cache |
google.cloud.storage_control_v2.types.AnywhereCache
Required. The Anywhere Cache instance to be updated. This corresponds to the |
update_mask |
google.protobuf.field_mask_pb2.FieldMask
Required. List of fields to be updated. Mutable fields of AnywhereCache include |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation.Operation |
An object representing a long-running operation. The result type for the operation will be AnywhereCache An Anywhere Cache Instance. |
update_folder_intelligence_config
update_folder_intelligence_config(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.UpdateFolderIntelligenceConfigRequest,
dict,
]
] = None,
*,
intelligence_config: typing.Optional[
google.cloud.storage_control_v2.types.storage_control.IntelligenceConfig
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.storage_control_v2.types.storage_control.IntelligenceConfigUpdates the Folder scoped singleton IntelligenceConfig resource.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_update_folder_intelligence_config():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.UpdateFolderIntelligenceConfigRequest(
)
# Make the request
response = client.update_folder_intelligence_config(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.UpdateFolderIntelligenceConfigRequest, dict]
The request object. Request message to update the |
intelligence_config |
google.cloud.storage_control_v2.types.IntelligenceConfig
Required. The |
update_mask |
google.protobuf.field_mask_pb2.FieldMask
Required. The |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.types.IntelligenceConfig |
The IntelligenceConfig resource associated with your organization, folder, or project. |
update_managed_folder
update_managed_folder(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.UpdateManagedFolderRequest,
dict,
]
] = None,
*,
managed_folder: typing.Optional[
google.cloud.storage_control_v2.types.storage_control.ManagedFolder
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.storage_control_v2.types.storage_control.ManagedFolderUpdates a managed folder. Currently, this RPC only supports
updating the rapid_cache_config field.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_update_managed_folder():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.UpdateManagedFolderRequest(
)
# Make the request
response = client.update_managed_folder(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.UpdateManagedFolderRequest, dict]
The request object. Request message for UpdateManagedFolder. |
managed_folder |
google.cloud.storage_control_v2.types.ManagedFolder
Required. Properties of the managed folder being updated. Currently, this RPC only supports updating the |
update_mask |
google.protobuf.field_mask_pb2.FieldMask
Optional. Update mask for managed_folder. Currently, this RPC only supports updating the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.types.ManagedFolder |
A managed folder. |
update_organization_intelligence_config
update_organization_intelligence_config(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.UpdateOrganizationIntelligenceConfigRequest,
dict,
]
] = None,
*,
intelligence_config: typing.Optional[
google.cloud.storage_control_v2.types.storage_control.IntelligenceConfig
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.storage_control_v2.types.storage_control.IntelligenceConfigUpdates the Organization scoped singleton IntelligenceConfig resource.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_update_organization_intelligence_config():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.UpdateOrganizationIntelligenceConfigRequest(
)
# Make the request
response = client.update_organization_intelligence_config(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.UpdateOrganizationIntelligenceConfigRequest, dict]
The request object. Request message to update the |
intelligence_config |
google.cloud.storage_control_v2.types.IntelligenceConfig
Required. The |
update_mask |
google.protobuf.field_mask_pb2.FieldMask
Required. The |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.types.IntelligenceConfig |
The IntelligenceConfig resource associated with your organization, folder, or project. |
update_project_intelligence_config
update_project_intelligence_config(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.UpdateProjectIntelligenceConfigRequest,
dict,
]
] = None,
*,
intelligence_config: typing.Optional[
google.cloud.storage_control_v2.types.storage_control.IntelligenceConfig
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.storage_control_v2.types.storage_control.IntelligenceConfigUpdates the Project scoped singleton IntelligenceConfig resource.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_update_project_intelligence_config():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.UpdateProjectIntelligenceConfigRequest(
)
# Make the request
response = client.update_project_intelligence_config(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.UpdateProjectIntelligenceConfigRequest, dict]
The request object. Request message to update the |
intelligence_config |
google.cloud.storage_control_v2.types.IntelligenceConfig
Required. The |
update_mask |
google.protobuf.field_mask_pb2.FieldMask
Required. The |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.types.IntelligenceConfig |
The IntelligenceConfig resource associated with your organization, folder, or project. |
update_rapid_cache
update_rapid_cache(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.UpdateRapidCacheRequest,
dict,
]
] = None,
*,
rapid_cache: typing.Optional[
google.cloud.storage_control_v2.types.storage_control.RapidCache
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.OperationUpdates a Rapid Cache instance.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_update_rapid_cache():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.UpdateRapidCacheRequest(
)
# Make the request
operation = client.update_rapid_cache(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.UpdateRapidCacheRequest, dict]
The request object. Request message for UpdateRapidCache. |
rapid_cache |
google.cloud.storage_control_v2.types.RapidCache
Required. The RapidCache to update. This corresponds to the |
update_mask |
google.protobuf.field_mask_pb2.FieldMask
Required. List of fields to be updated. Mutable fields of RapidCache include |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation.Operation |
An object representing a long-running operation. The result type for the operation will be RapidCache A Rapid Cache Instance. |
view_object_full_context
view_object_full_context(
request: typing.Optional[
typing.Union[
google.cloud.storage_control_v2.types.storage_control.ViewObjectFullContextRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
context_key: typing.Optional[str] = None,
generation: typing.Optional[int] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.storage_control_v2.types.storage_control.ObjectFullContextRetrieves the full content of an object context, including its key, value, and any associated extended data for a given context key.
Object contexts can optionally contain extended data. If an object context contains extended data, the metadata payload structure will contain only its type URL. To retrieve the full extended data, call this method.
Returns the complete representation of the context as an
[ObjectFullContext][google.storage.control.v2.ObjectFullContext].
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import storage_control_v2
def sample_view_object_full_context():
# Create a client
client = storage_control_v2.StorageControlClient()
# Initialize request argument(s)
request = storage_control_v2.ViewObjectFullContextRequest(
context_key="context_key_value",
name="name_value",
)
# Make the request
response = client.view_object_full_context(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.storage_control_v2.types.ViewObjectFullContextRequest, dict]
The request object. Request message for ViewObjectFullContext. |
name |
str
Required. The name of the object. Format: |
context_key |
str
Required. The key of the object context to retrieve. This corresponds to the |
generation |
int
Optional. If present, selects a specific revision of this object (as opposed to the latest version, the default). This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.storage_control_v2.types.ObjectFullContext |
A full representation of an object context. |