CertificateAuthorityService¶
- class google.cloud.security.privateca_v1.services.certificate_authority_service.CertificateAuthorityServiceAsyncClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.security.privateca_v1.services.certificate_authority_service.transports.base.CertificateAuthorityServiceTransport, typing.Callable[[...], google.cloud.security.privateca_v1.services.certificate_authority_service.transports.base.CertificateAuthorityServiceTransport]]] = 'grpc_asyncio', client_options: typing.Optional[google.api_core.client_options.ClientOptions] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)[source]¶
[Certificate Authority Service][google.cloud.security.privateca.v1.CertificateAuthorityService] manages private certificate authorities and issued certificates.
Instantiates the certificate authority service async client.
- Parameters
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,CertificateAuthorityServiceTransport,Callable[..., CertificateAuthorityServiceTransport]]]) – The transport to use, or a Callable that constructs and returns a new transport to use. If a Callable is given, it will be called with the same set of initialization arguments as used in the CertificateAuthorityServiceTransport 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
api_endpoint
property can be used to override the default endpoint provided by the client whentransport
is not explicitly provided. Only if this property is not set andtransport
was not explicitly provided, the endpoint is determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment variable, which have one of the following values: “always” (always use the default mTLS endpoint), “never” (always use the default regular endpoint) and “auto” (auto-switch to the default mTLS endpoint if client certificate is present; this is the default value).2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is “true”, then the
client_cert_source
property can be used to provide a client certificate for mTLS transport. If not provided, the default SSL client certificate will be used if present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is “false” or not set, no client certificate will be used.3. The
universe_domain
property can be used to override the default “googleapis.com” universe. Note thatapi_endpoint
property still takes precedence; anduniverse_domain
is currently not supported for mTLS.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
None
, then default info will be used. Generally, you only need to set this if you’re developing your own client library.
- Raises
google.auth.exceptions.MutualTlsChannelError – If mutual TLS transport creation failed for any reason.
- async activate_certificate_authority(request: Optional[Union[google.cloud.security.privateca_v1.types.service.ActivateCertificateAuthorityRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation_async.AsyncOperation[source]¶
Activate a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that is in state [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. After the parent Certificate Authority signs a certificate signing request from [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation process.
# 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.security import privateca_v1 async def sample_activate_certificate_authority(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) subordinate_config = privateca_v1.SubordinateConfig() subordinate_config.certificate_authority = "certificate_authority_value" request = privateca_v1.ActivateCertificateAuthorityRequest( name="name_value", pem_ca_certificate="pem_ca_certificate_value", subordinate_config=subordinate_config, ) # Make the request operation = client.activate_certificate_authority(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.ActivateCertificateAuthorityRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.ActivateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority].
name (
str
) –Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format
projects/*/locations/*/caPools/*/certificateAuthorities/*
.This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.security.privateca_v1.types.CertificateAuthority
A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] represents an individual Certificate Authority. A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] can be used to create [Certificates][google.cloud.security.privateca.v1.Certificate].
- The result type for the operation will be
- Return type
- property api_endpoint¶
Return the API endpoint used by the client instance.
- Returns
The API endpoint used by the client instance.
- Return type
- static ca_pool_path(project: str, location: str, ca_pool: str) → str¶
Returns a fully-qualified ca_pool string.
- async cancel_operation(request: Optional[google.longrunning.operations_pb2.CancelOperationRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → None[source]¶
Starts asynchronous cancellation on a long-running operation.
The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn’t support this method, it returns google.rpc.Code.UNIMPLEMENTED.
- Parameters
request (
CancelOperationRequest
) – The request object. Request message for CancelOperation method.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
None
- static certificate_authority_path(project: str, location: str, ca_pool: str, certificate_authority: str) → str¶
Returns a fully-qualified certificate_authority string.
- static certificate_path(project: str, location: str, ca_pool: str, certificate: str) → str¶
Returns a fully-qualified certificate string.
- static certificate_revocation_list_path(project: str, location: str, ca_pool: str, certificate_authority: str, certificate_revocation_list: str) → str¶
Returns a fully-qualified certificate_revocation_list string.
- static certificate_template_path(project: str, location: str, certificate_template: str) → str¶
Returns a fully-qualified certificate_template string.
- static common_billing_account_path(billing_account: str) → str¶
Returns a fully-qualified billing_account string.
- static common_location_path(project: str, location: str) → str¶
Returns a fully-qualified location string.
- static common_organization_path(organization: str) → str¶
Returns a fully-qualified organization string.
- async create_ca_pool(request: Optional[Union[google.cloud.security.privateca_v1.types.service.CreateCaPoolRequest, dict]] = None, *, parent: Optional[str] = None, ca_pool: Optional[google.cloud.security.privateca_v1.types.resources.CaPool] = None, ca_pool_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation_async.AsyncOperation[source]¶
Create a [CaPool][google.cloud.security.privateca.v1.CaPool].
# 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.security import privateca_v1 async def sample_create_ca_pool(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) ca_pool = privateca_v1.CaPool() ca_pool.tier = "DEVOPS" request = privateca_v1.CreateCaPoolRequest( parent="parent_value", ca_pool_id="ca_pool_id_value", ca_pool=ca_pool, ) # Make the request operation = client.create_ca_pool(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.CreateCaPoolRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.CreateCaPool][google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCaPool].
parent (
str
) –Required. The resource name of the location associated with the [CaPool][google.cloud.security.privateca.v1.CaPool], in the format
projects/*/locations/*
.This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.ca_pool (
google.cloud.security.privateca_v1.types.CaPool
) –Required. A [CaPool][google.cloud.security.privateca.v1.CaPool] with initial field values.
This corresponds to the
ca_pool
field on therequest
instance; ifrequest
is provided, this should not be set.ca_pool_id (
str
) –Required. It must be unique within a location and match the regular expression
[a-zA-Z0-9_-]{1,63}
This corresponds to the
ca_pool_id
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.security.privateca_v1.types.CaPool
A [CaPool][google.cloud.security.privateca.v1.CaPool] represents a group of [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority] that form a trust anchor. A [CaPool][google.cloud.security.privateca.v1.CaPool] can be used to manage issuance policies for one or more [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] resources and to rotate CA certificates in and out of the trust anchor.
- The result type for the operation will be
- Return type
- async create_certificate(request: Optional[Union[google.cloud.security.privateca_v1.types.service.CreateCertificateRequest, dict]] = None, *, parent: Optional[str] = None, certificate: Optional[google.cloud.security.privateca_v1.types.resources.Certificate] = None, certificate_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.types.resources.Certificate[source]¶
Create a new [Certificate][google.cloud.security.privateca.v1.Certificate] in a given Project, Location from a particular [CaPool][google.cloud.security.privateca.v1.CaPool].
# 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.security import privateca_v1 async def sample_create_certificate(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) certificate = privateca_v1.Certificate() certificate.pem_csr = "pem_csr_value" request = privateca_v1.CreateCertificateRequest( parent="parent_value", certificate=certificate, ) # Make the request response = await client.create_certificate(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.CreateCertificateRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.CreateCertificate][google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificate].
parent (
str
) –Required. The resource name of the [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the [Certificate][google.cloud.security.privateca.v1.Certificate], in the format
projects/*/locations/*/caPools/*
.This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.certificate (
google.cloud.security.privateca_v1.types.Certificate
) –Required. A [Certificate][google.cloud.security.privateca.v1.Certificate] with initial field values.
This corresponds to the
certificate
field on therequest
instance; ifrequest
is provided, this should not be set.certificate_id (
str
) –Optional. It must be unique within a location and match the regular expression
[a-zA-Z0-9_-]{1,63}
. This field is required when using a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the Enterprise [CertificateAuthority.Tier][], but is optional and its value is ignored otherwise.This corresponds to the
certificate_id
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- A [Certificate][google.cloud.security.privateca.v1.Certificate] corresponds
to a signed X.509 certificate issued by a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
- Return type
- async create_certificate_authority(request: Optional[Union[google.cloud.security.privateca_v1.types.service.CreateCertificateAuthorityRequest, dict]] = None, *, parent: Optional[str] = None, certificate_authority: Optional[google.cloud.security.privateca_v1.types.resources.CertificateAuthority] = None, certificate_authority_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation_async.AsyncOperation[source]¶
Create a new [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in a given Project and Location.
# 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.security import privateca_v1 async def sample_create_certificate_authority(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) certificate_authority = privateca_v1.CertificateAuthority() certificate_authority.type_ = "SUBORDINATE" certificate_authority.key_spec.cloud_kms_key_version = "cloud_kms_key_version_value" request = privateca_v1.CreateCertificateAuthorityRequest( parent="parent_value", certificate_authority_id="certificate_authority_id_value", certificate_authority=certificate_authority, ) # Make the request operation = client.create_certificate_authority(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.CreateCertificateAuthorityRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.CreateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateAuthority].
parent (
str
) –Required. The resource name of the [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority], in the format
projects/*/locations/*/caPools/*
.This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.certificate_authority (
google.cloud.security.privateca_v1.types.CertificateAuthority
) –Required. A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] with initial field values.
This corresponds to the
certificate_authority
field on therequest
instance; ifrequest
is provided, this should not be set.certificate_authority_id (
str
) –Required. It must be unique within a location and match the regular expression
[a-zA-Z0-9_-]{1,63}
This corresponds to the
certificate_authority_id
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.security.privateca_v1.types.CertificateAuthority
A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] represents an individual Certificate Authority. A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] can be used to create [Certificates][google.cloud.security.privateca.v1.Certificate].
- The result type for the operation will be
- Return type
- async create_certificate_template(request: Optional[Union[google.cloud.security.privateca_v1.types.service.CreateCertificateTemplateRequest, dict]] = None, *, parent: Optional[str] = None, certificate_template: Optional[google.cloud.security.privateca_v1.types.resources.CertificateTemplate] = None, certificate_template_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation_async.AsyncOperation[source]¶
Create a new [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] in a given Project and Location.
# 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.security import privateca_v1 async def sample_create_certificate_template(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) request = privateca_v1.CreateCertificateTemplateRequest( parent="parent_value", certificate_template_id="certificate_template_id_value", ) # Make the request operation = client.create_certificate_template(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.CreateCertificateTemplateRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.CreateCertificateTemplate][google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateTemplate].
parent (
str
) –Required. The resource name of the location associated with the [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate], in the format
projects/*/locations/*
.This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.certificate_template (
google.cloud.security.privateca_v1.types.CertificateTemplate
) –Required. A [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] with initial field values.
This corresponds to the
certificate_template
field on therequest
instance; ifrequest
is provided, this should not be set.certificate_template_id (
str
) –Required. It must be unique within a location and match the regular expression
[a-zA-Z0-9_-]{1,63}
This corresponds to the
certificate_template_id
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.security.privateca_v1.types.CertificateTemplate
A [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] refers to a managed template for certificate issuance.
- The result type for the operation will be
- Return type
- async delete_ca_pool(request: Optional[Union[google.cloud.security.privateca_v1.types.service.DeleteCaPoolRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation_async.AsyncOperation[source]¶
Delete a [CaPool][google.cloud.security.privateca.v1.CaPool].
# 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.security import privateca_v1 async def sample_delete_ca_pool(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) request = privateca_v1.DeleteCaPoolRequest( name="name_value", ) # Make the request operation = client.delete_ca_pool(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.DeleteCaPoolRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.DeleteCaPool][google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCaPool].
name (
str
) –Required. The resource name for this [CaPool][google.cloud.security.privateca.v1.CaPool] in the format
projects/*/locations/*/caPools/*
.This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
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);
}
- The result type for the operation will be
- Return type
- async delete_certificate_authority(request: Optional[Union[google.cloud.security.privateca_v1.types.service.DeleteCertificateAuthorityRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation_async.AsyncOperation[source]¶
Delete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
# 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.security import privateca_v1 async def sample_delete_certificate_authority(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) request = privateca_v1.DeleteCertificateAuthorityRequest( name="name_value", ) # Make the request operation = client.delete_certificate_authority(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.DeleteCertificateAuthorityRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.DeleteCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateAuthority].
name (
str
) –Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format
projects/*/locations/*/caPools/*/certificateAuthorities/*
.This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.security.privateca_v1.types.CertificateAuthority
A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] represents an individual Certificate Authority. A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] can be used to create [Certificates][google.cloud.security.privateca.v1.Certificate].
- The result type for the operation will be
- Return type
- async delete_certificate_template(request: Optional[Union[google.cloud.security.privateca_v1.types.service.DeleteCertificateTemplateRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation_async.AsyncOperation[source]¶
DeleteCertificateTemplate deletes a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].
# 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.security import privateca_v1 async def sample_delete_certificate_template(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) request = privateca_v1.DeleteCertificateTemplateRequest( name="name_value", ) # Make the request operation = client.delete_certificate_template(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.DeleteCertificateTemplateRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.DeleteCertificateTemplate][google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateTemplate].
name (
str
) –Required. The resource name for this [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] in the format
projects/*/locations/*/certificateTemplates/*
.This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
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);
}
- The result type for the operation will be
- Return type
- async delete_operation(request: Optional[google.longrunning.operations_pb2.DeleteOperationRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → None[source]¶
Deletes a long-running operation.
This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn’t support this method, it returns google.rpc.Code.UNIMPLEMENTED.
- Parameters
request (
DeleteOperationRequest
) – The request object. Request message for DeleteOperation method.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
None
- async disable_certificate_authority(request: Optional[Union[google.cloud.security.privateca_v1.types.service.DisableCertificateAuthorityRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation_async.AsyncOperation[source]¶
Disable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
# 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.security import privateca_v1 async def sample_disable_certificate_authority(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) request = privateca_v1.DisableCertificateAuthorityRequest( name="name_value", ) # Make the request operation = client.disable_certificate_authority(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.DisableCertificateAuthorityRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.DisableCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.DisableCertificateAuthority].
name (
str
) –Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format
projects/*/locations/*/caPools/*/certificateAuthorities/*
.This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.security.privateca_v1.types.CertificateAuthority
A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] represents an individual Certificate Authority. A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] can be used to create [Certificates][google.cloud.security.privateca.v1.Certificate].
- The result type for the operation will be
- Return type
- async enable_certificate_authority(request: Optional[Union[google.cloud.security.privateca_v1.types.service.EnableCertificateAuthorityRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation_async.AsyncOperation[source]¶
Enable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
# 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.security import privateca_v1 async def sample_enable_certificate_authority(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) request = privateca_v1.EnableCertificateAuthorityRequest( name="name_value", ) # Make the request operation = client.enable_certificate_authority(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.EnableCertificateAuthorityRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.EnableCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.EnableCertificateAuthority].
name (
str
) –Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format
projects/*/locations/*/caPools/*/certificateAuthorities/*
.This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.security.privateca_v1.types.CertificateAuthority
A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] represents an individual Certificate Authority. A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] can be used to create [Certificates][google.cloud.security.privateca.v1.Certificate].
- The result type for the operation will be
- Return type
- async fetch_ca_certs(request: Optional[Union[google.cloud.security.privateca_v1.types.service.FetchCaCertsRequest, dict]] = None, *, ca_pool: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.types.service.FetchCaCertsResponse[source]¶
FetchCaCerts returns the current trust anchor for the [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA certificate chains for all certificate authorities in the ENABLED, DISABLED, or STAGED states.
# 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.security import privateca_v1 async def sample_fetch_ca_certs(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) request = privateca_v1.FetchCaCertsRequest( ca_pool="ca_pool_value", ) # Make the request response = await client.fetch_ca_certs(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.FetchCaCertsRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.FetchCaCerts][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCaCerts].
ca_pool (
str
) –Required. The resource name for the [CaPool][google.cloud.security.privateca.v1.CaPool] in the format
projects/*/locations/*/caPools/*
.This corresponds to the
ca_pool
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- Response message for
[CertificateAuthorityService.FetchCaCerts][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCaCerts].
- Return type
google.cloud.security.privateca_v1.types.FetchCaCertsResponse
- async fetch_certificate_authority_csr(request: Optional[Union[google.cloud.security.privateca_v1.types.service.FetchCertificateAuthorityCsrRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.types.service.FetchCertificateAuthorityCsrResponse[source]¶
Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that is in state [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. The CSR must then be signed by the desired parent Certificate Authority, which could be another [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] resource, or could be an on-prem certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority].
# 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.security import privateca_v1 async def sample_fetch_certificate_authority_csr(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) request = privateca_v1.FetchCertificateAuthorityCsrRequest( name="name_value", ) # Make the request response = await client.fetch_certificate_authority_csr(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.FetchCertificateAuthorityCsrRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr].
name (
str
) –Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format
projects/*/locations/*/caPools/*/certificateAuthorities/*
.This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- Response message for
[CertificateAuthorityService.FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr].
- Return type
google.cloud.security.privateca_v1.types.FetchCertificateAuthorityCsrResponse
- classmethod from_service_account_file(filename: str, *args, **kwargs)[source]¶
- Creates an instance of this client using the provided credentials
file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
- classmethod from_service_account_info(info: dict, *args, **kwargs)[source]¶
- Creates an instance of this client using the provided credentials
info.
- Parameters
info (dict) – The service account private key info.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
- classmethod from_service_account_json(filename: str, *args, **kwargs)¶
- Creates an instance of this client using the provided credentials
file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
- async get_ca_pool(request: Optional[Union[google.cloud.security.privateca_v1.types.service.GetCaPoolRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.types.resources.CaPool[source]¶
Returns a [CaPool][google.cloud.security.privateca.v1.CaPool].
# 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.security import privateca_v1 async def sample_get_ca_pool(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) request = privateca_v1.GetCaPoolRequest( name="name_value", ) # Make the request response = await client.get_ca_pool(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.GetCaPoolRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.GetCaPool][google.cloud.security.privateca.v1.CertificateAuthorityService.GetCaPool].
name (
str
) –Required. The [name][google.cloud.security.privateca.v1.CaPool.name] of the [CaPool][google.cloud.security.privateca.v1.CaPool] to get.
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- A [CaPool][google.cloud.security.privateca.v1.CaPool] represents a group of
[CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority] that form a trust anchor. A [CaPool][google.cloud.security.privateca.v1.CaPool] can be used to manage issuance policies for one or more [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] resources and to rotate CA certificates in and out of the trust anchor.
- Return type
- async get_certificate(request: Optional[Union[google.cloud.security.privateca_v1.types.service.GetCertificateRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.types.resources.Certificate[source]¶
Returns a [Certificate][google.cloud.security.privateca.v1.Certificate].
# 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.security import privateca_v1 async def sample_get_certificate(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) request = privateca_v1.GetCertificateRequest( name="name_value", ) # Make the request response = await client.get_certificate(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.GetCertificateRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.GetCertificate][google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificate].
name (
str
) –Required. The [name][google.cloud.security.privateca.v1.Certificate.name] of the [Certificate][google.cloud.security.privateca.v1.Certificate] to get.
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- A [Certificate][google.cloud.security.privateca.v1.Certificate] corresponds
to a signed X.509 certificate issued by a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
- Return type
- async get_certificate_authority(request: Optional[Union[google.cloud.security.privateca_v1.types.service.GetCertificateAuthorityRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.types.resources.CertificateAuthority[source]¶
Returns a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
# 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.security import privateca_v1 async def sample_get_certificate_authority(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) request = privateca_v1.GetCertificateAuthorityRequest( name="name_value", ) # Make the request response = await client.get_certificate_authority(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.GetCertificateAuthorityRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.GetCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateAuthority].
name (
str
) –Required. The [name][google.cloud.security.privateca.v1.CertificateAuthority.name] of the [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] to get.
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- A
[CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] represents an individual Certificate Authority. A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] can be used to create [Certificates][google.cloud.security.privateca.v1.Certificate].
- Return type
google.cloud.security.privateca_v1.types.CertificateAuthority
- async get_certificate_revocation_list(request: Optional[Union[google.cloud.security.privateca_v1.types.service.GetCertificateRevocationListRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.types.resources.CertificateRevocationList[source]¶
Returns a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].
# 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.security import privateca_v1 async def sample_get_certificate_revocation_list(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) request = privateca_v1.GetCertificateRevocationListRequest( name="name_value", ) # Make the request response = await client.get_certificate_revocation_list(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.GetCertificateRevocationListRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.GetCertificateRevocationList][google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateRevocationList].
name (
str
) –Required. The [name][google.cloud.security.privateca.v1.CertificateRevocationList.name] of the [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] to get.
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- A
[CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] corresponds to a signed X.509 certificate Revocation List (CRL). A CRL contains the serial numbers of certificates that should no longer be trusted.
- Return type
google.cloud.security.privateca_v1.types.CertificateRevocationList
- async get_certificate_template(request: Optional[Union[google.cloud.security.privateca_v1.types.service.GetCertificateTemplateRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.types.resources.CertificateTemplate[source]¶
Returns a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].
# 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.security import privateca_v1 async def sample_get_certificate_template(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) request = privateca_v1.GetCertificateTemplateRequest( name="name_value", ) # Make the request response = await client.get_certificate_template(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.GetCertificateTemplateRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.GetCertificateTemplate][google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateTemplate].
name (
str
) –Required. The [name][google.cloud.security.privateca.v1.CertificateTemplate.name] of the [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] to get.
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- A
[CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] refers to a managed template for certificate issuance.
- Return type
google.cloud.security.privateca_v1.types.CertificateTemplate
- async get_iam_policy(request: Optional[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.iam.v1.policy_pb2.Policy[source]¶
Gets the IAM access control policy for a function.
Returns an empty policy if the function exists and does not have a policy set.
- Parameters
request (
GetIamPolicyRequest
) – The request object. Request message for GetIamPolicy method.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A
Policy
is a collection ofbindings
. Abinding
binds one or moremembers
to a singlerole
. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). Arole
is a named list of permissions (defined by IAM or configured by users). Abinding
can optionally specify acondition
, which is a logic expression that further constrains the role binding based on attributes about the request and/or target resource.JSON Example
{ "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')", } } ] }
YAML Example
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')
For a description of IAM and its features, see the IAM developer’s guide.
- Return type
Policy
- async get_location(request: Optional[google.cloud.location.locations_pb2.GetLocationRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.location.locations_pb2.Location[source]¶
Gets information about a location.
- Parameters
request (
GetLocationRequest
) – The request object. Request message for GetLocation method.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Location object.
- Return type
Location
- classmethod get_mtls_endpoint_and_cert_source(client_options: Optional[google.api_core.client_options.ClientOptions] = None)[source]¶
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.
- Parameters
client_options (google.api_core.client_options.ClientOptions) – Custom options for the client. Only the api_endpoint and client_cert_source properties may be used in this method.
- Returns
- returns the API endpoint and the
client cert source to use.
- Return type
- Raises
google.auth.exceptions.MutualTLSChannelError – If any errors happen.
- async get_operation(request: Optional[google.longrunning.operations_pb2.GetOperationRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.longrunning.operations_pb2.Operation[source]¶
Gets the latest state of a long-running operation.
- Parameters
request (
GetOperationRequest
) – The request object. Request message for GetOperation method.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An
Operation
object.- Return type
Operation
- classmethod get_transport_class(label: Optional[str] = None) → Type[google.cloud.security.privateca_v1.services.certificate_authority_service.transports.base.CertificateAuthorityServiceTransport]¶
Returns an appropriate transport class.
- Parameters
label – The name of the desired transport. If none is provided, then the first transport in the registry is used.
- Returns
The transport class to use.
- async list_ca_pools(request: Optional[Union[google.cloud.security.privateca_v1.types.service.ListCaPoolsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCaPoolsAsyncPager[source]¶
Lists [CaPools][google.cloud.security.privateca.v1.CaPool].
# 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.security import privateca_v1 async def sample_list_ca_pools(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) request = privateca_v1.ListCaPoolsRequest( parent="parent_value", ) # Make the request page_result = client.list_ca_pools(request=request) # Handle the response async for response in page_result: print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.ListCaPoolsRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.ListCaPools][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCaPools].
parent (
str
) –Required. The resource name of the location associated with the [CaPools][google.cloud.security.privateca.v1.CaPool], in the format
projects/*/locations/*
.This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- Response message for
[CertificateAuthorityService.ListCaPools][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCaPools].
Iterating over this object will yield results and resolve additional pages automatically.
- Return type
- async list_certificate_authorities(request: Optional[Union[google.cloud.security.privateca_v1.types.service.ListCertificateAuthoritiesRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCertificateAuthoritiesAsyncPager[source]¶
Lists [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority].
# 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.security import privateca_v1 async def sample_list_certificate_authorities(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) request = privateca_v1.ListCertificateAuthoritiesRequest( parent="parent_value", ) # Make the request page_result = client.list_certificate_authorities(request=request) # Handle the response async for response in page_result: print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.ListCertificateAuthoritiesRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.ListCertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateAuthorities].
parent (
str
) –Required. The resource name of the [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority], in the format
projects/*/locations/*/caPools/*
.This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- Response message for
[CertificateAuthorityService.ListCertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateAuthorities].
Iterating over this object will yield results and resolve additional pages automatically.
- Return type
- async list_certificate_revocation_lists(request: Optional[Union[google.cloud.security.privateca_v1.types.service.ListCertificateRevocationListsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCertificateRevocationListsAsyncPager[source]¶
Lists [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList].
# 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.security import privateca_v1 async def sample_list_certificate_revocation_lists(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) request = privateca_v1.ListCertificateRevocationListsRequest( parent="parent_value", ) # Make the request page_result = client.list_certificate_revocation_lists(request=request) # Handle the response async for response in page_result: print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.ListCertificateRevocationListsRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.ListCertificateRevocationLists][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateRevocationLists].
parent (
str
) –Required. The resource name of the location associated with the [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList], in the format
projects/*/locations/*/caPools/*/certificateAuthorities/*
.This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- Response message for
[CertificateAuthorityService.ListCertificateRevocationLists][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateRevocationLists].
Iterating over this object will yield results and resolve additional pages automatically.
- Return type
- async list_certificate_templates(request: Optional[Union[google.cloud.security.privateca_v1.types.service.ListCertificateTemplatesRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCertificateTemplatesAsyncPager[source]¶
Lists [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate].
# 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.security import privateca_v1 async def sample_list_certificate_templates(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) request = privateca_v1.ListCertificateTemplatesRequest( parent="parent_value", ) # Make the request page_result = client.list_certificate_templates(request=request) # Handle the response async for response in page_result: print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.ListCertificateTemplatesRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.ListCertificateTemplates][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateTemplates].
parent (
str
) –Required. The resource name of the location associated with the [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate], in the format
projects/*/locations/*
.This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- Response message for
[CertificateAuthorityService.ListCertificateTemplates][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateTemplates].
Iterating over this object will yield results and resolve additional pages automatically.
- Return type
- async list_certificates(request: Optional[Union[google.cloud.security.privateca_v1.types.service.ListCertificatesRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCertificatesAsyncPager[source]¶
Lists [Certificates][google.cloud.security.privateca.v1.Certificate].
# 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.security import privateca_v1 async def sample_list_certificates(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) request = privateca_v1.ListCertificatesRequest( parent="parent_value", ) # Make the request page_result = client.list_certificates(request=request) # Handle the response async for response in page_result: print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.ListCertificatesRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.ListCertificates][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificates].
parent (
str
) –Required. The resource name of the location associated with the [Certificates][google.cloud.security.privateca.v1.Certificate], in the format
projects/*/locations/*/caPools/*
.This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- Response message for
[CertificateAuthorityService.ListCertificates][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificates].
Iterating over this object will yield results and resolve additional pages automatically.
- Return type
- async list_locations(request: Optional[google.cloud.location.locations_pb2.ListLocationsRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.location.locations_pb2.ListLocationsResponse[source]¶
Lists information about the supported locations for this service.
- Parameters
request (
ListLocationsRequest
) – The request object. Request message for ListLocations method.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Response message for
ListLocations
method.- Return type
ListLocationsResponse
- async list_operations(request: Optional[google.longrunning.operations_pb2.ListOperationsRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.longrunning.operations_pb2.ListOperationsResponse[source]¶
Lists operations that match the specified filter in the request.
- Parameters
request (
ListOperationsRequest
) – The request object. Request message for ListOperations method.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Response message for
ListOperations
method.- Return type
ListOperationsResponse
- static parse_ca_pool_path(path: str) → Dict[str, str]¶
Parses a ca_pool path into its component segments.
- static parse_certificate_authority_path(path: str) → Dict[str, str]¶
Parses a certificate_authority path into its component segments.
- static parse_certificate_path(path: str) → Dict[str, str]¶
Parses a certificate path into its component segments.
- static parse_certificate_revocation_list_path(path: str) → Dict[str, str]¶
Parses a certificate_revocation_list path into its component segments.
- static parse_certificate_template_path(path: str) → Dict[str, str]¶
Parses a certificate_template path into its component segments.
- static parse_common_billing_account_path(path: str) → Dict[str, str]¶
Parse a billing_account path into its component segments.
- static parse_common_folder_path(path: str) → Dict[str, str]¶
Parse a folder path into its component segments.
- static parse_common_location_path(path: str) → Dict[str, str]¶
Parse a location path into its component segments.
- static parse_common_organization_path(path: str) → Dict[str, str]¶
Parse a organization path into its component segments.
- static parse_common_project_path(path: str) → Dict[str, str]¶
Parse a project path into its component segments.
- async revoke_certificate(request: Optional[Union[google.cloud.security.privateca_v1.types.service.RevokeCertificateRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.types.resources.Certificate[source]¶
Revoke a [Certificate][google.cloud.security.privateca.v1.Certificate].
# 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.security import privateca_v1 async def sample_revoke_certificate(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) request = privateca_v1.RevokeCertificateRequest( name="name_value", reason="ATTRIBUTE_AUTHORITY_COMPROMISE", ) # Make the request response = await client.revoke_certificate(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.RevokeCertificateRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.RevokeCertificate][google.cloud.security.privateca.v1.CertificateAuthorityService.RevokeCertificate].
name (
str
) –Required. The resource name for this [Certificate][google.cloud.security.privateca.v1.Certificate] in the format
projects/*/locations/*/caPools/*/certificates/*
.This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- A [Certificate][google.cloud.security.privateca.v1.Certificate] corresponds
to a signed X.509 certificate issued by a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
- Return type
- async set_iam_policy(request: Optional[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.iam.v1.policy_pb2.Policy[source]¶
Sets the IAM access control policy on the specified function.
Replaces any existing policy.
- Parameters
request (
SetIamPolicyRequest
) – The request object. Request message for SetIamPolicy method.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A
Policy
is a collection ofbindings
. Abinding
binds one or moremembers
to a singlerole
. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). Arole
is a named list of permissions (defined by IAM or configured by users). Abinding
can optionally specify acondition
, which is a logic expression that further constrains the role binding based on attributes about the request and/or target resource.JSON Example
{ "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')", } } ] }
YAML Example
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')
For a description of IAM and its features, see the IAM developer’s guide.
- Return type
Policy
- async test_iam_permissions(request: Optional[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse[source]¶
- Tests the specified IAM permissions against the IAM access control
policy for a function.
If the function does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
- Parameters
request (
TestIamPermissionsRequest
) – The request object. Request message for TestIamPermissions method.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Response message for
TestIamPermissions
method.- Return type
TestIamPermissionsResponse
- property transport: google.cloud.security.privateca_v1.services.certificate_authority_service.transports.base.CertificateAuthorityServiceTransport¶
Returns the transport used by the client instance.
- Returns
The transport used by the client instance.
- Return type
CertificateAuthorityServiceTransport
- async undelete_certificate_authority(request: Optional[Union[google.cloud.security.privateca_v1.types.service.UndeleteCertificateAuthorityRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation_async.AsyncOperation[source]¶
Undelete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that has been deleted.
# 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.security import privateca_v1 async def sample_undelete_certificate_authority(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) request = privateca_v1.UndeleteCertificateAuthorityRequest( name="name_value", ) # Make the request operation = client.undelete_certificate_authority(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.UndeleteCertificateAuthorityRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.UndeleteCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.UndeleteCertificateAuthority].
name (
str
) –Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format
projects/*/locations/*/caPools/*/certificateAuthorities/*
.This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.security.privateca_v1.types.CertificateAuthority
A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] represents an individual Certificate Authority. A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] can be used to create [Certificates][google.cloud.security.privateca.v1.Certificate].
- The result type for the operation will be
- Return type
- property universe_domain: str¶
Return the universe domain used by the client instance.
- Returns
- The universe domain used
by the client instance.
- Return type
- async update_ca_pool(request: Optional[Union[google.cloud.security.privateca_v1.types.service.UpdateCaPoolRequest, dict]] = None, *, ca_pool: Optional[google.cloud.security.privateca_v1.types.resources.CaPool] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation_async.AsyncOperation[source]¶
Update a [CaPool][google.cloud.security.privateca.v1.CaPool].
# 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.security import privateca_v1 async def sample_update_ca_pool(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) ca_pool = privateca_v1.CaPool() ca_pool.tier = "DEVOPS" request = privateca_v1.UpdateCaPoolRequest( ca_pool=ca_pool, ) # Make the request operation = client.update_ca_pool(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.UpdateCaPoolRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.UpdateCaPool][google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCaPool].
ca_pool (
google.cloud.security.privateca_v1.types.CaPool
) –Required. [CaPool][google.cloud.security.privateca.v1.CaPool] with updated values.
This corresponds to the
ca_pool
field on therequest
instance; ifrequest
is provided, this should not be set.update_mask (
google.protobuf.field_mask_pb2.FieldMask
) –Required. A list of fields to be updated in this request.
This corresponds to the
update_mask
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.security.privateca_v1.types.CaPool
A [CaPool][google.cloud.security.privateca.v1.CaPool] represents a group of [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority] that form a trust anchor. A [CaPool][google.cloud.security.privateca.v1.CaPool] can be used to manage issuance policies for one or more [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] resources and to rotate CA certificates in and out of the trust anchor.
- The result type for the operation will be
- Return type
- async update_certificate(request: Optional[Union[google.cloud.security.privateca_v1.types.service.UpdateCertificateRequest, dict]] = None, *, certificate: Optional[google.cloud.security.privateca_v1.types.resources.Certificate] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.types.resources.Certificate[source]¶
Update a [Certificate][google.cloud.security.privateca.v1.Certificate]. Currently, the only field you can update is the [labels][google.cloud.security.privateca.v1.Certificate.labels] 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.security import privateca_v1 async def sample_update_certificate(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) certificate = privateca_v1.Certificate() certificate.pem_csr = "pem_csr_value" request = privateca_v1.UpdateCertificateRequest( certificate=certificate, ) # Make the request response = await client.update_certificate(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.UpdateCertificateRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.UpdateCertificate][google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificate].
certificate (
google.cloud.security.privateca_v1.types.Certificate
) –Required. [Certificate][google.cloud.security.privateca.v1.Certificate] with updated values.
This corresponds to the
certificate
field on therequest
instance; ifrequest
is provided, this should not be set.update_mask (
google.protobuf.field_mask_pb2.FieldMask
) –Required. A list of fields to be updated in this request.
This corresponds to the
update_mask
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- A [Certificate][google.cloud.security.privateca.v1.Certificate] corresponds
to a signed X.509 certificate issued by a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
- Return type
- async update_certificate_authority(request: Optional[Union[google.cloud.security.privateca_v1.types.service.UpdateCertificateAuthorityRequest, dict]] = None, *, certificate_authority: Optional[google.cloud.security.privateca_v1.types.resources.CertificateAuthority] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation_async.AsyncOperation[source]¶
Update a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
# 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.security import privateca_v1 async def sample_update_certificate_authority(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) certificate_authority = privateca_v1.CertificateAuthority() certificate_authority.type_ = "SUBORDINATE" certificate_authority.key_spec.cloud_kms_key_version = "cloud_kms_key_version_value" request = privateca_v1.UpdateCertificateAuthorityRequest( certificate_authority=certificate_authority, ) # Make the request operation = client.update_certificate_authority(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.UpdateCertificateAuthorityRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.UpdateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateAuthority].
certificate_authority (
google.cloud.security.privateca_v1.types.CertificateAuthority
) –Required. [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] with updated values.
This corresponds to the
certificate_authority
field on therequest
instance; ifrequest
is provided, this should not be set.update_mask (
google.protobuf.field_mask_pb2.FieldMask
) –Required. A list of fields to be updated in this request.
This corresponds to the
update_mask
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.security.privateca_v1.types.CertificateAuthority
A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] represents an individual Certificate Authority. A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] can be used to create [Certificates][google.cloud.security.privateca.v1.Certificate].
- The result type for the operation will be
- Return type
- async update_certificate_revocation_list(request: Optional[Union[google.cloud.security.privateca_v1.types.service.UpdateCertificateRevocationListRequest, dict]] = None, *, certificate_revocation_list: Optional[google.cloud.security.privateca_v1.types.resources.CertificateRevocationList] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation_async.AsyncOperation[source]¶
Update a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].
# 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.security import privateca_v1 async def sample_update_certificate_revocation_list(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) request = privateca_v1.UpdateCertificateRevocationListRequest( ) # Make the request operation = client.update_certificate_revocation_list(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.UpdateCertificateRevocationListRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.UpdateCertificateRevocationList][google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateRevocationList].
certificate_revocation_list (
google.cloud.security.privateca_v1.types.CertificateRevocationList
) –Required. [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] with updated values.
This corresponds to the
certificate_revocation_list
field on therequest
instance; ifrequest
is provided, this should not be set.update_mask (
google.protobuf.field_mask_pb2.FieldMask
) –Required. A list of fields to be updated in this request.
This corresponds to the
update_mask
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.security.privateca_v1.types.CertificateRevocationList
A [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] corresponds to a signed X.509 certificate Revocation List (CRL). A CRL contains the serial numbers of certificates that should no longer be trusted.
- The result type for the operation will be
- Return type
- async update_certificate_template(request: Optional[Union[google.cloud.security.privateca_v1.types.service.UpdateCertificateTemplateRequest, dict]] = None, *, certificate_template: Optional[google.cloud.security.privateca_v1.types.resources.CertificateTemplate] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation_async.AsyncOperation[source]¶
Update a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].
# 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.security import privateca_v1 async def sample_update_certificate_template(): # Create a client client = privateca_v1.CertificateAuthorityServiceAsyncClient() # Initialize request argument(s) request = privateca_v1.UpdateCertificateTemplateRequest( ) # Make the request operation = client.update_certificate_template(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.security.privateca_v1.types.UpdateCertificateTemplateRequest, dict]]) – The request object. Request message for [CertificateAuthorityService.UpdateCertificateTemplate][google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateTemplate].
certificate_template (
google.cloud.security.privateca_v1.types.CertificateTemplate
) –Required. [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] with updated values.
This corresponds to the
certificate_template
field on therequest
instance; ifrequest
is provided, this should not be set.update_mask (
google.protobuf.field_mask_pb2.FieldMask
) –Required. A list of fields to be updated in this request.
This corresponds to the
update_mask
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.security.privateca_v1.types.CertificateTemplate
A [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] refers to a managed template for certificate issuance.
- The result type for the operation will be
- Return type
- class google.cloud.security.privateca_v1.services.certificate_authority_service.CertificateAuthorityServiceClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.security.privateca_v1.services.certificate_authority_service.transports.base.CertificateAuthorityServiceTransport, typing.Callable[[...], google.cloud.security.privateca_v1.services.certificate_authority_service.transports.base.CertificateAuthorityServiceTransport]]] = 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 object>)[source]¶
[Certificate Authority Service][google.cloud.security.privateca.v1.CertificateAuthorityService] manages private certificate authorities and issued certificates.
Instantiates the certificate authority service client.
- Parameters
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,CertificateAuthorityServiceTransport,Callable[..., CertificateAuthorityServiceTransport]]]) – 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 CertificateAuthorityServiceTransport 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
api_endpoint
property can be used to override the default endpoint provided by the client whentransport
is not explicitly provided. Only if this property is not set andtransport
was not explicitly provided, the endpoint is determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment variable, which have one of the following values: “always” (always use the default mTLS endpoint), “never” (always use the default regular endpoint) and “auto” (auto-switch to the default mTLS endpoint if client certificate is present; this is the default value).2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is “true”, then the
client_cert_source
property can be used to provide a client certificate for mTLS transport. If not provided, the default SSL client certificate will be used if present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is “false” or not set, no client certificate will be used.3. The
universe_domain
property can be used to override the default “googleapis.com” universe. Note that theapi_endpoint
property still takes precedence; anduniverse_domain
is currently not supported for mTLS.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
None
, then default info will be used. Generally, you only need to set this if you’re developing your own client library.
- Raises
google.auth.exceptions.MutualTLSChannelError – If mutual TLS transport creation failed for any reason.
- __exit__(type, value, traceback)[source]¶
Releases underlying transport’s resources.
Warning
ONLY use as a context manager if the transport is NOT shared with other clients! Exiting the with block will CLOSE the transport and may cause errors in other clients!
- activate_certificate_authority(request: Optional[Union[google.cloud.security.privateca_v1.types.service.ActivateCertificateAuthorityRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation.Operation[source]¶
Activate a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that is in state [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. After the parent Certificate Authority signs a certificate signing request from [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation process.
# 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.security import privateca_v1 def sample_activate_certificate_authority(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) subordinate_config = privateca_v1.SubordinateConfig() subordinate_config.certificate_authority = "certificate_authority_value" request = privateca_v1.ActivateCertificateAuthorityRequest( name="name_value", pem_ca_certificate="pem_ca_certificate_value", subordinate_config=subordinate_config, ) # Make the request operation = client.activate_certificate_authority(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.ActivateCertificateAuthorityRequest, dict]) – The request object. Request message for [CertificateAuthorityService.ActivateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority].
name (str) –
Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format
projects/*/locations/*/caPools/*/certificateAuthorities/*
.This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.security.privateca_v1.types.CertificateAuthority
A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] represents an individual Certificate Authority. A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] can be used to create [Certificates][google.cloud.security.privateca.v1.Certificate].
- The result type for the operation will be
- Return type
- property api_endpoint¶
Return the API endpoint used by the client instance.
- Returns
The API endpoint used by the client instance.
- Return type
- static ca_pool_path(project: str, location: str, ca_pool: str) → str[source]¶
Returns a fully-qualified ca_pool string.
- cancel_operation(request: Optional[google.longrunning.operations_pb2.CancelOperationRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → None[source]¶
Starts asynchronous cancellation on a long-running operation.
The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn’t support this method, it returns google.rpc.Code.UNIMPLEMENTED.
- Parameters
request (
CancelOperationRequest
) – The request object. Request message for CancelOperation method.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
None
- static certificate_authority_path(project: str, location: str, ca_pool: str, certificate_authority: str) → str[source]¶
Returns a fully-qualified certificate_authority string.
- static certificate_path(project: str, location: str, ca_pool: str, certificate: str) → str[source]¶
Returns a fully-qualified certificate string.
- static certificate_revocation_list_path(project: str, location: str, ca_pool: str, certificate_authority: str, certificate_revocation_list: str) → str[source]¶
Returns a fully-qualified certificate_revocation_list string.
- static certificate_template_path(project: str, location: str, certificate_template: str) → str[source]¶
Returns a fully-qualified certificate_template string.
- static common_billing_account_path(billing_account: str) → str[source]¶
Returns a fully-qualified billing_account string.
- static common_location_path(project: str, location: str) → str[source]¶
Returns a fully-qualified location string.
- static common_organization_path(organization: str) → str[source]¶
Returns a fully-qualified organization string.
- create_ca_pool(request: Optional[Union[google.cloud.security.privateca_v1.types.service.CreateCaPoolRequest, dict]] = None, *, parent: Optional[str] = None, ca_pool: Optional[google.cloud.security.privateca_v1.types.resources.CaPool] = None, ca_pool_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation.Operation[source]¶
Create a [CaPool][google.cloud.security.privateca.v1.CaPool].
# 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.security import privateca_v1 def sample_create_ca_pool(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) ca_pool = privateca_v1.CaPool() ca_pool.tier = "DEVOPS" request = privateca_v1.CreateCaPoolRequest( parent="parent_value", ca_pool_id="ca_pool_id_value", ca_pool=ca_pool, ) # Make the request operation = client.create_ca_pool(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.CreateCaPoolRequest, dict]) – The request object. Request message for [CertificateAuthorityService.CreateCaPool][google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCaPool].
parent (str) –
Required. The resource name of the location associated with the [CaPool][google.cloud.security.privateca.v1.CaPool], in the format
projects/*/locations/*
.This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.ca_pool (google.cloud.security.privateca_v1.types.CaPool) –
Required. A [CaPool][google.cloud.security.privateca.v1.CaPool] with initial field values.
This corresponds to the
ca_pool
field on therequest
instance; ifrequest
is provided, this should not be set.ca_pool_id (str) –
Required. It must be unique within a location and match the regular expression
[a-zA-Z0-9_-]{1,63}
This corresponds to the
ca_pool_id
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.security.privateca_v1.types.CaPool
A [CaPool][google.cloud.security.privateca.v1.CaPool] represents a group of [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority] that form a trust anchor. A [CaPool][google.cloud.security.privateca.v1.CaPool] can be used to manage issuance policies for one or more [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] resources and to rotate CA certificates in and out of the trust anchor.
- The result type for the operation will be
- Return type
- create_certificate(request: Optional[Union[google.cloud.security.privateca_v1.types.service.CreateCertificateRequest, dict]] = None, *, parent: Optional[str] = None, certificate: Optional[google.cloud.security.privateca_v1.types.resources.Certificate] = None, certificate_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.types.resources.Certificate[source]¶
Create a new [Certificate][google.cloud.security.privateca.v1.Certificate] in a given Project, Location from a particular [CaPool][google.cloud.security.privateca.v1.CaPool].
# 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.security import privateca_v1 def sample_create_certificate(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) certificate = privateca_v1.Certificate() certificate.pem_csr = "pem_csr_value" request = privateca_v1.CreateCertificateRequest( parent="parent_value", certificate=certificate, ) # Make the request response = client.create_certificate(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.CreateCertificateRequest, dict]) – The request object. Request message for [CertificateAuthorityService.CreateCertificate][google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificate].
parent (str) –
Required. The resource name of the [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the [Certificate][google.cloud.security.privateca.v1.Certificate], in the format
projects/*/locations/*/caPools/*
.This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.certificate (google.cloud.security.privateca_v1.types.Certificate) –
Required. A [Certificate][google.cloud.security.privateca.v1.Certificate] with initial field values.
This corresponds to the
certificate
field on therequest
instance; ifrequest
is provided, this should not be set.certificate_id (str) –
Optional. It must be unique within a location and match the regular expression
[a-zA-Z0-9_-]{1,63}
. This field is required when using a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the Enterprise [CertificateAuthority.Tier][], but is optional and its value is ignored otherwise.This corresponds to the
certificate_id
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- A [Certificate][google.cloud.security.privateca.v1.Certificate] corresponds
to a signed X.509 certificate issued by a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
- Return type
- create_certificate_authority(request: Optional[Union[google.cloud.security.privateca_v1.types.service.CreateCertificateAuthorityRequest, dict]] = None, *, parent: Optional[str] = None, certificate_authority: Optional[google.cloud.security.privateca_v1.types.resources.CertificateAuthority] = None, certificate_authority_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation.Operation[source]¶
Create a new [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in a given Project and Location.
# 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.security import privateca_v1 def sample_create_certificate_authority(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) certificate_authority = privateca_v1.CertificateAuthority() certificate_authority.type_ = "SUBORDINATE" certificate_authority.key_spec.cloud_kms_key_version = "cloud_kms_key_version_value" request = privateca_v1.CreateCertificateAuthorityRequest( parent="parent_value", certificate_authority_id="certificate_authority_id_value", certificate_authority=certificate_authority, ) # Make the request operation = client.create_certificate_authority(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.CreateCertificateAuthorityRequest, dict]) – The request object. Request message for [CertificateAuthorityService.CreateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateAuthority].
parent (str) –
Required. The resource name of the [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority], in the format
projects/*/locations/*/caPools/*
.This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.certificate_authority (google.cloud.security.privateca_v1.types.CertificateAuthority) –
Required. A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] with initial field values.
This corresponds to the
certificate_authority
field on therequest
instance; ifrequest
is provided, this should not be set.certificate_authority_id (str) –
Required. It must be unique within a location and match the regular expression
[a-zA-Z0-9_-]{1,63}
This corresponds to the
certificate_authority_id
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.security.privateca_v1.types.CertificateAuthority
A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] represents an individual Certificate Authority. A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] can be used to create [Certificates][google.cloud.security.privateca.v1.Certificate].
- The result type for the operation will be
- Return type
- create_certificate_template(request: Optional[Union[google.cloud.security.privateca_v1.types.service.CreateCertificateTemplateRequest, dict]] = None, *, parent: Optional[str] = None, certificate_template: Optional[google.cloud.security.privateca_v1.types.resources.CertificateTemplate] = None, certificate_template_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation.Operation[source]¶
Create a new [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] in a given Project and Location.
# 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.security import privateca_v1 def sample_create_certificate_template(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) request = privateca_v1.CreateCertificateTemplateRequest( parent="parent_value", certificate_template_id="certificate_template_id_value", ) # Make the request operation = client.create_certificate_template(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.CreateCertificateTemplateRequest, dict]) – The request object. Request message for [CertificateAuthorityService.CreateCertificateTemplate][google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateTemplate].
parent (str) –
Required. The resource name of the location associated with the [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate], in the format
projects/*/locations/*
.This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.certificate_template (google.cloud.security.privateca_v1.types.CertificateTemplate) –
Required. A [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] with initial field values.
This corresponds to the
certificate_template
field on therequest
instance; ifrequest
is provided, this should not be set.certificate_template_id (str) –
Required. It must be unique within a location and match the regular expression
[a-zA-Z0-9_-]{1,63}
This corresponds to the
certificate_template_id
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.security.privateca_v1.types.CertificateTemplate
A [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] refers to a managed template for certificate issuance.
- The result type for the operation will be
- Return type
- delete_ca_pool(request: Optional[Union[google.cloud.security.privateca_v1.types.service.DeleteCaPoolRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation.Operation[source]¶
Delete a [CaPool][google.cloud.security.privateca.v1.CaPool].
# 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.security import privateca_v1 def sample_delete_ca_pool(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) request = privateca_v1.DeleteCaPoolRequest( name="name_value", ) # Make the request operation = client.delete_ca_pool(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.DeleteCaPoolRequest, dict]) – The request object. Request message for [CertificateAuthorityService.DeleteCaPool][google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCaPool].
name (str) –
Required. The resource name for this [CaPool][google.cloud.security.privateca.v1.CaPool] in the format
projects/*/locations/*/caPools/*
.This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
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);
}
- The result type for the operation will be
- Return type
- delete_certificate_authority(request: Optional[Union[google.cloud.security.privateca_v1.types.service.DeleteCertificateAuthorityRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation.Operation[source]¶
Delete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
# 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.security import privateca_v1 def sample_delete_certificate_authority(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) request = privateca_v1.DeleteCertificateAuthorityRequest( name="name_value", ) # Make the request operation = client.delete_certificate_authority(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.DeleteCertificateAuthorityRequest, dict]) – The request object. Request message for [CertificateAuthorityService.DeleteCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateAuthority].
name (str) –
Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format
projects/*/locations/*/caPools/*/certificateAuthorities/*
.This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.security.privateca_v1.types.CertificateAuthority
A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] represents an individual Certificate Authority. A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] can be used to create [Certificates][google.cloud.security.privateca.v1.Certificate].
- The result type for the operation will be
- Return type
- delete_certificate_template(request: Optional[Union[google.cloud.security.privateca_v1.types.service.DeleteCertificateTemplateRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation.Operation[source]¶
DeleteCertificateTemplate deletes a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].
# 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.security import privateca_v1 def sample_delete_certificate_template(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) request = privateca_v1.DeleteCertificateTemplateRequest( name="name_value", ) # Make the request operation = client.delete_certificate_template(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.DeleteCertificateTemplateRequest, dict]) – The request object. Request message for [CertificateAuthorityService.DeleteCertificateTemplate][google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateTemplate].
name (str) –
Required. The resource name for this [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] in the format
projects/*/locations/*/certificateTemplates/*
.This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
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);
}
- The result type for the operation will be
- Return type
- delete_operation(request: Optional[google.longrunning.operations_pb2.DeleteOperationRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → None[source]¶
Deletes a long-running operation.
This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn’t support this method, it returns google.rpc.Code.UNIMPLEMENTED.
- Parameters
request (
DeleteOperationRequest
) – The request object. Request message for DeleteOperation method.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
None
- disable_certificate_authority(request: Optional[Union[google.cloud.security.privateca_v1.types.service.DisableCertificateAuthorityRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation.Operation[source]¶
Disable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
# 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.security import privateca_v1 def sample_disable_certificate_authority(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) request = privateca_v1.DisableCertificateAuthorityRequest( name="name_value", ) # Make the request operation = client.disable_certificate_authority(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.DisableCertificateAuthorityRequest, dict]) – The request object. Request message for [CertificateAuthorityService.DisableCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.DisableCertificateAuthority].
name (str) –
Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format
projects/*/locations/*/caPools/*/certificateAuthorities/*
.This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.security.privateca_v1.types.CertificateAuthority
A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] represents an individual Certificate Authority. A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] can be used to create [Certificates][google.cloud.security.privateca.v1.Certificate].
- The result type for the operation will be
- Return type
- enable_certificate_authority(request: Optional[Union[google.cloud.security.privateca_v1.types.service.EnableCertificateAuthorityRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation.Operation[source]¶
Enable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
# 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.security import privateca_v1 def sample_enable_certificate_authority(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) request = privateca_v1.EnableCertificateAuthorityRequest( name="name_value", ) # Make the request operation = client.enable_certificate_authority(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.EnableCertificateAuthorityRequest, dict]) – The request object. Request message for [CertificateAuthorityService.EnableCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.EnableCertificateAuthority].
name (str) –
Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format
projects/*/locations/*/caPools/*/certificateAuthorities/*
.This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.security.privateca_v1.types.CertificateAuthority
A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] represents an individual Certificate Authority. A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] can be used to create [Certificates][google.cloud.security.privateca.v1.Certificate].
- The result type for the operation will be
- Return type
- fetch_ca_certs(request: Optional[Union[google.cloud.security.privateca_v1.types.service.FetchCaCertsRequest, dict]] = None, *, ca_pool: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.types.service.FetchCaCertsResponse[source]¶
FetchCaCerts returns the current trust anchor for the [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA certificate chains for all certificate authorities in the ENABLED, DISABLED, or STAGED states.
# 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.security import privateca_v1 def sample_fetch_ca_certs(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) request = privateca_v1.FetchCaCertsRequest( ca_pool="ca_pool_value", ) # Make the request response = client.fetch_ca_certs(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.FetchCaCertsRequest, dict]) – The request object. Request message for [CertificateAuthorityService.FetchCaCerts][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCaCerts].
ca_pool (str) –
Required. The resource name for the [CaPool][google.cloud.security.privateca.v1.CaPool] in the format
projects/*/locations/*/caPools/*
.This corresponds to the
ca_pool
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- Response message for
[CertificateAuthorityService.FetchCaCerts][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCaCerts].
- Return type
google.cloud.security.privateca_v1.types.FetchCaCertsResponse
- fetch_certificate_authority_csr(request: Optional[Union[google.cloud.security.privateca_v1.types.service.FetchCertificateAuthorityCsrRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.types.service.FetchCertificateAuthorityCsrResponse[source]¶
Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that is in state [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. The CSR must then be signed by the desired parent Certificate Authority, which could be another [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] resource, or could be an on-prem certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority].
# 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.security import privateca_v1 def sample_fetch_certificate_authority_csr(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) request = privateca_v1.FetchCertificateAuthorityCsrRequest( name="name_value", ) # Make the request response = client.fetch_certificate_authority_csr(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.FetchCertificateAuthorityCsrRequest, dict]) – The request object. Request message for [CertificateAuthorityService.FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr].
name (str) –
Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format
projects/*/locations/*/caPools/*/certificateAuthorities/*
.This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- Response message for
[CertificateAuthorityService.FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr].
- Return type
google.cloud.security.privateca_v1.types.FetchCertificateAuthorityCsrResponse
- classmethod from_service_account_file(filename: str, *args, **kwargs)[source]¶
- Creates an instance of this client using the provided credentials
file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
- classmethod from_service_account_info(info: dict, *args, **kwargs)[source]¶
- Creates an instance of this client using the provided credentials
info.
- Parameters
info (dict) – The service account private key info.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
- classmethod from_service_account_json(filename: str, *args, **kwargs)¶
- Creates an instance of this client using the provided credentials
file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
- get_ca_pool(request: Optional[Union[google.cloud.security.privateca_v1.types.service.GetCaPoolRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.types.resources.CaPool[source]¶
Returns a [CaPool][google.cloud.security.privateca.v1.CaPool].
# 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.security import privateca_v1 def sample_get_ca_pool(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) request = privateca_v1.GetCaPoolRequest( name="name_value", ) # Make the request response = client.get_ca_pool(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.GetCaPoolRequest, dict]) – The request object. Request message for [CertificateAuthorityService.GetCaPool][google.cloud.security.privateca.v1.CertificateAuthorityService.GetCaPool].
name (str) –
Required. The [name][google.cloud.security.privateca.v1.CaPool.name] of the [CaPool][google.cloud.security.privateca.v1.CaPool] to get.
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- A [CaPool][google.cloud.security.privateca.v1.CaPool] represents a group of
[CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority] that form a trust anchor. A [CaPool][google.cloud.security.privateca.v1.CaPool] can be used to manage issuance policies for one or more [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] resources and to rotate CA certificates in and out of the trust anchor.
- Return type
- get_certificate(request: Optional[Union[google.cloud.security.privateca_v1.types.service.GetCertificateRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.types.resources.Certificate[source]¶
Returns a [Certificate][google.cloud.security.privateca.v1.Certificate].
# 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.security import privateca_v1 def sample_get_certificate(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) request = privateca_v1.GetCertificateRequest( name="name_value", ) # Make the request response = client.get_certificate(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.GetCertificateRequest, dict]) – The request object. Request message for [CertificateAuthorityService.GetCertificate][google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificate].
name (str) –
Required. The [name][google.cloud.security.privateca.v1.Certificate.name] of the [Certificate][google.cloud.security.privateca.v1.Certificate] to get.
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- A [Certificate][google.cloud.security.privateca.v1.Certificate] corresponds
to a signed X.509 certificate issued by a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
- Return type
- get_certificate_authority(request: Optional[Union[google.cloud.security.privateca_v1.types.service.GetCertificateAuthorityRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.types.resources.CertificateAuthority[source]¶
Returns a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
# 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.security import privateca_v1 def sample_get_certificate_authority(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) request = privateca_v1.GetCertificateAuthorityRequest( name="name_value", ) # Make the request response = client.get_certificate_authority(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.GetCertificateAuthorityRequest, dict]) – The request object. Request message for [CertificateAuthorityService.GetCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateAuthority].
name (str) –
Required. The [name][google.cloud.security.privateca.v1.CertificateAuthority.name] of the [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] to get.
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- A
[CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] represents an individual Certificate Authority. A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] can be used to create [Certificates][google.cloud.security.privateca.v1.Certificate].
- Return type
google.cloud.security.privateca_v1.types.CertificateAuthority
- get_certificate_revocation_list(request: Optional[Union[google.cloud.security.privateca_v1.types.service.GetCertificateRevocationListRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.types.resources.CertificateRevocationList[source]¶
Returns a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].
# 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.security import privateca_v1 def sample_get_certificate_revocation_list(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) request = privateca_v1.GetCertificateRevocationListRequest( name="name_value", ) # Make the request response = client.get_certificate_revocation_list(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.GetCertificateRevocationListRequest, dict]) – The request object. Request message for [CertificateAuthorityService.GetCertificateRevocationList][google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateRevocationList].
name (str) –
Required. The [name][google.cloud.security.privateca.v1.CertificateRevocationList.name] of the [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] to get.
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- A
[CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] corresponds to a signed X.509 certificate Revocation List (CRL). A CRL contains the serial numbers of certificates that should no longer be trusted.
- Return type
google.cloud.security.privateca_v1.types.CertificateRevocationList
- get_certificate_template(request: Optional[Union[google.cloud.security.privateca_v1.types.service.GetCertificateTemplateRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.types.resources.CertificateTemplate[source]¶
Returns a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].
# 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.security import privateca_v1 def sample_get_certificate_template(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) request = privateca_v1.GetCertificateTemplateRequest( name="name_value", ) # Make the request response = client.get_certificate_template(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.GetCertificateTemplateRequest, dict]) – The request object. Request message for [CertificateAuthorityService.GetCertificateTemplate][google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateTemplate].
name (str) –
Required. The [name][google.cloud.security.privateca.v1.CertificateTemplate.name] of the [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] to get.
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- A
[CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] refers to a managed template for certificate issuance.
- Return type
google.cloud.security.privateca_v1.types.CertificateTemplate
- get_iam_policy(request: Optional[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.iam.v1.policy_pb2.Policy[source]¶
Gets the IAM access control policy for a function.
Returns an empty policy if the function exists and does not have a policy set.
- Parameters
request (
GetIamPolicyRequest
) – The request object. Request message for GetIamPolicy method.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A
Policy
is a collection ofbindings
. Abinding
binds one or moremembers
to a singlerole
. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). Arole
is a named list of permissions (defined by IAM or configured by users). Abinding
can optionally specify acondition
, which is a logic expression that further constrains the role binding based on attributes about the request and/or target resource.JSON Example
{ "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')", } } ] }
YAML Example
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')
For a description of IAM and its features, see the IAM developer’s guide.
- Return type
Policy
- get_location(request: Optional[google.cloud.location.locations_pb2.GetLocationRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.location.locations_pb2.Location[source]¶
Gets information about a location.
- Parameters
request (
GetLocationRequest
) – The request object. Request message for GetLocation method.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Location object.
- Return type
Location
- classmethod get_mtls_endpoint_and_cert_source(client_options: Optional[google.api_core.client_options.ClientOptions] = None)[source]¶
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.
- Parameters
client_options (google.api_core.client_options.ClientOptions) – Custom options for the client. Only the api_endpoint and client_cert_source properties may be used in this method.
- Returns
- returns the API endpoint and the
client cert source to use.
- Return type
- Raises
google.auth.exceptions.MutualTLSChannelError – If any errors happen.
- get_operation(request: Optional[google.longrunning.operations_pb2.GetOperationRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.longrunning.operations_pb2.Operation[source]¶
Gets the latest state of a long-running operation.
- Parameters
request (
GetOperationRequest
) – The request object. Request message for GetOperation method.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An
Operation
object.- Return type
Operation
- list_ca_pools(request: Optional[Union[google.cloud.security.privateca_v1.types.service.ListCaPoolsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCaPoolsPager[source]¶
Lists [CaPools][google.cloud.security.privateca.v1.CaPool].
# 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.security import privateca_v1 def sample_list_ca_pools(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) request = privateca_v1.ListCaPoolsRequest( parent="parent_value", ) # Make the request page_result = client.list_ca_pools(request=request) # Handle the response for response in page_result: print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.ListCaPoolsRequest, dict]) – The request object. Request message for [CertificateAuthorityService.ListCaPools][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCaPools].
parent (str) –
Required. The resource name of the location associated with the [CaPools][google.cloud.security.privateca.v1.CaPool], in the format
projects/*/locations/*
.This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- Response message for
[CertificateAuthorityService.ListCaPools][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCaPools].
Iterating over this object will yield results and resolve additional pages automatically.
- Return type
google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCaPoolsPager
- list_certificate_authorities(request: Optional[Union[google.cloud.security.privateca_v1.types.service.ListCertificateAuthoritiesRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCertificateAuthoritiesPager[source]¶
Lists [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority].
# 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.security import privateca_v1 def sample_list_certificate_authorities(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) request = privateca_v1.ListCertificateAuthoritiesRequest( parent="parent_value", ) # Make the request page_result = client.list_certificate_authorities(request=request) # Handle the response for response in page_result: print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.ListCertificateAuthoritiesRequest, dict]) – The request object. Request message for [CertificateAuthorityService.ListCertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateAuthorities].
parent (str) –
Required. The resource name of the [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority], in the format
projects/*/locations/*/caPools/*
.This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- Response message for
[CertificateAuthorityService.ListCertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateAuthorities].
Iterating over this object will yield results and resolve additional pages automatically.
- Return type
- list_certificate_revocation_lists(request: Optional[Union[google.cloud.security.privateca_v1.types.service.ListCertificateRevocationListsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCertificateRevocationListsPager[source]¶
Lists [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList].
# 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.security import privateca_v1 def sample_list_certificate_revocation_lists(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) request = privateca_v1.ListCertificateRevocationListsRequest( parent="parent_value", ) # Make the request page_result = client.list_certificate_revocation_lists(request=request) # Handle the response for response in page_result: print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.ListCertificateRevocationListsRequest, dict]) – The request object. Request message for [CertificateAuthorityService.ListCertificateRevocationLists][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateRevocationLists].
parent (str) –
Required. The resource name of the location associated with the [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList], in the format
projects/*/locations/*/caPools/*/certificateAuthorities/*
.This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- Response message for
[CertificateAuthorityService.ListCertificateRevocationLists][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateRevocationLists].
Iterating over this object will yield results and resolve additional pages automatically.
- Return type
- list_certificate_templates(request: Optional[Union[google.cloud.security.privateca_v1.types.service.ListCertificateTemplatesRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCertificateTemplatesPager[source]¶
Lists [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate].
# 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.security import privateca_v1 def sample_list_certificate_templates(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) request = privateca_v1.ListCertificateTemplatesRequest( parent="parent_value", ) # Make the request page_result = client.list_certificate_templates(request=request) # Handle the response for response in page_result: print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.ListCertificateTemplatesRequest, dict]) – The request object. Request message for [CertificateAuthorityService.ListCertificateTemplates][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateTemplates].
parent (str) –
Required. The resource name of the location associated with the [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate], in the format
projects/*/locations/*
.This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- Response message for
[CertificateAuthorityService.ListCertificateTemplates][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateTemplates].
Iterating over this object will yield results and resolve additional pages automatically.
- Return type
- list_certificates(request: Optional[Union[google.cloud.security.privateca_v1.types.service.ListCertificatesRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCertificatesPager[source]¶
Lists [Certificates][google.cloud.security.privateca.v1.Certificate].
# 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.security import privateca_v1 def sample_list_certificates(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) request = privateca_v1.ListCertificatesRequest( parent="parent_value", ) # Make the request page_result = client.list_certificates(request=request) # Handle the response for response in page_result: print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.ListCertificatesRequest, dict]) – The request object. Request message for [CertificateAuthorityService.ListCertificates][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificates].
parent (str) –
Required. The resource name of the location associated with the [Certificates][google.cloud.security.privateca.v1.Certificate], in the format
projects/*/locations/*/caPools/*
.This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- Response message for
[CertificateAuthorityService.ListCertificates][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificates].
Iterating over this object will yield results and resolve additional pages automatically.
- Return type
- list_locations(request: Optional[google.cloud.location.locations_pb2.ListLocationsRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.location.locations_pb2.ListLocationsResponse[source]¶
Lists information about the supported locations for this service.
- Parameters
request (
ListLocationsRequest
) – The request object. Request message for ListLocations method.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Response message for
ListLocations
method.- Return type
ListLocationsResponse
- list_operations(request: Optional[google.longrunning.operations_pb2.ListOperationsRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.longrunning.operations_pb2.ListOperationsResponse[source]¶
Lists operations that match the specified filter in the request.
- Parameters
request (
ListOperationsRequest
) – The request object. Request message for ListOperations method.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Response message for
ListOperations
method.- Return type
ListOperationsResponse
- static parse_ca_pool_path(path: str) → Dict[str, str][source]¶
Parses a ca_pool path into its component segments.
- static parse_certificate_authority_path(path: str) → Dict[str, str][source]¶
Parses a certificate_authority path into its component segments.
- static parse_certificate_path(path: str) → Dict[str, str][source]¶
Parses a certificate path into its component segments.
- static parse_certificate_revocation_list_path(path: str) → Dict[str, str][source]¶
Parses a certificate_revocation_list path into its component segments.
- static parse_certificate_template_path(path: str) → Dict[str, str][source]¶
Parses a certificate_template path into its component segments.
- static parse_common_billing_account_path(path: str) → Dict[str, str][source]¶
Parse a billing_account path into its component segments.
- static parse_common_folder_path(path: str) → Dict[str, str][source]¶
Parse a folder path into its component segments.
- static parse_common_location_path(path: str) → Dict[str, str][source]¶
Parse a location path into its component segments.
- static parse_common_organization_path(path: str) → Dict[str, str][source]¶
Parse a organization path into its component segments.
- static parse_common_project_path(path: str) → Dict[str, str][source]¶
Parse a project path into its component segments.
- revoke_certificate(request: Optional[Union[google.cloud.security.privateca_v1.types.service.RevokeCertificateRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.types.resources.Certificate[source]¶
Revoke a [Certificate][google.cloud.security.privateca.v1.Certificate].
# 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.security import privateca_v1 def sample_revoke_certificate(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) request = privateca_v1.RevokeCertificateRequest( name="name_value", reason="ATTRIBUTE_AUTHORITY_COMPROMISE", ) # Make the request response = client.revoke_certificate(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.RevokeCertificateRequest, dict]) – The request object. Request message for [CertificateAuthorityService.RevokeCertificate][google.cloud.security.privateca.v1.CertificateAuthorityService.RevokeCertificate].
name (str) –
Required. The resource name for this [Certificate][google.cloud.security.privateca.v1.Certificate] in the format
projects/*/locations/*/caPools/*/certificates/*
.This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- A [Certificate][google.cloud.security.privateca.v1.Certificate] corresponds
to a signed X.509 certificate issued by a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
- Return type
- set_iam_policy(request: Optional[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.iam.v1.policy_pb2.Policy[source]¶
Sets the IAM access control policy on the specified function.
Replaces any existing policy.
- Parameters
request (
SetIamPolicyRequest
) – The request object. Request message for SetIamPolicy method.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A
Policy
is a collection ofbindings
. Abinding
binds one or moremembers
to a singlerole
. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). Arole
is a named list of permissions (defined by IAM or configured by users). Abinding
can optionally specify acondition
, which is a logic expression that further constrains the role binding based on attributes about the request and/or target resource.JSON Example
{ "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')", } } ] }
YAML Example
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')
For a description of IAM and its features, see the IAM developer’s guide.
- Return type
Policy
- test_iam_permissions(request: Optional[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse[source]¶
- Tests the specified IAM permissions against the IAM access control
policy for a function.
If the function does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
- Parameters
request (
TestIamPermissionsRequest
) – The request object. Request message for TestIamPermissions method.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Response message for
TestIamPermissions
method.- Return type
TestIamPermissionsResponse
- property transport: google.cloud.security.privateca_v1.services.certificate_authority_service.transports.base.CertificateAuthorityServiceTransport¶
Returns the transport used by the client instance.
- Returns
- The transport used by the client
instance.
- Return type
CertificateAuthorityServiceTransport
- undelete_certificate_authority(request: Optional[Union[google.cloud.security.privateca_v1.types.service.UndeleteCertificateAuthorityRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation.Operation[source]¶
Undelete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that has been deleted.
# 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.security import privateca_v1 def sample_undelete_certificate_authority(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) request = privateca_v1.UndeleteCertificateAuthorityRequest( name="name_value", ) # Make the request operation = client.undelete_certificate_authority(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.UndeleteCertificateAuthorityRequest, dict]) – The request object. Request message for [CertificateAuthorityService.UndeleteCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.UndeleteCertificateAuthority].
name (str) –
Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format
projects/*/locations/*/caPools/*/certificateAuthorities/*
.This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.security.privateca_v1.types.CertificateAuthority
A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] represents an individual Certificate Authority. A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] can be used to create [Certificates][google.cloud.security.privateca.v1.Certificate].
- The result type for the operation will be
- Return type
- property universe_domain: str¶
Return the universe domain used by the client instance.
- Returns
The universe domain used by the client instance.
- Return type
- update_ca_pool(request: Optional[Union[google.cloud.security.privateca_v1.types.service.UpdateCaPoolRequest, dict]] = None, *, ca_pool: Optional[google.cloud.security.privateca_v1.types.resources.CaPool] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation.Operation[source]¶
Update a [CaPool][google.cloud.security.privateca.v1.CaPool].
# 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.security import privateca_v1 def sample_update_ca_pool(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) ca_pool = privateca_v1.CaPool() ca_pool.tier = "DEVOPS" request = privateca_v1.UpdateCaPoolRequest( ca_pool=ca_pool, ) # Make the request operation = client.update_ca_pool(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.UpdateCaPoolRequest, dict]) – The request object. Request message for [CertificateAuthorityService.UpdateCaPool][google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCaPool].
ca_pool (google.cloud.security.privateca_v1.types.CaPool) –
Required. [CaPool][google.cloud.security.privateca.v1.CaPool] with updated values.
This corresponds to the
ca_pool
field on therequest
instance; ifrequest
is provided, this should not be set.update_mask (google.protobuf.field_mask_pb2.FieldMask) –
Required. A list of fields to be updated in this request.
This corresponds to the
update_mask
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.security.privateca_v1.types.CaPool
A [CaPool][google.cloud.security.privateca.v1.CaPool] represents a group of [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority] that form a trust anchor. A [CaPool][google.cloud.security.privateca.v1.CaPool] can be used to manage issuance policies for one or more [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] resources and to rotate CA certificates in and out of the trust anchor.
- The result type for the operation will be
- Return type
- update_certificate(request: Optional[Union[google.cloud.security.privateca_v1.types.service.UpdateCertificateRequest, dict]] = None, *, certificate: Optional[google.cloud.security.privateca_v1.types.resources.Certificate] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.security.privateca_v1.types.resources.Certificate[source]¶
Update a [Certificate][google.cloud.security.privateca.v1.Certificate]. Currently, the only field you can update is the [labels][google.cloud.security.privateca.v1.Certificate.labels] 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.security import privateca_v1 def sample_update_certificate(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) certificate = privateca_v1.Certificate() certificate.pem_csr = "pem_csr_value" request = privateca_v1.UpdateCertificateRequest( certificate=certificate, ) # Make the request response = client.update_certificate(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.UpdateCertificateRequest, dict]) – The request object. Request message for [CertificateAuthorityService.UpdateCertificate][google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificate].
certificate (google.cloud.security.privateca_v1.types.Certificate) –
Required. [Certificate][google.cloud.security.privateca.v1.Certificate] with updated values.
This corresponds to the
certificate
field on therequest
instance; ifrequest
is provided, this should not be set.update_mask (google.protobuf.field_mask_pb2.FieldMask) –
Required. A list of fields to be updated in this request.
This corresponds to the
update_mask
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- A [Certificate][google.cloud.security.privateca.v1.Certificate] corresponds
to a signed X.509 certificate issued by a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
- Return type
- update_certificate_authority(request: Optional[Union[google.cloud.security.privateca_v1.types.service.UpdateCertificateAuthorityRequest, dict]] = None, *, certificate_authority: Optional[google.cloud.security.privateca_v1.types.resources.CertificateAuthority] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation.Operation[source]¶
Update a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
# 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.security import privateca_v1 def sample_update_certificate_authority(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) certificate_authority = privateca_v1.CertificateAuthority() certificate_authority.type_ = "SUBORDINATE" certificate_authority.key_spec.cloud_kms_key_version = "cloud_kms_key_version_value" request = privateca_v1.UpdateCertificateAuthorityRequest( certificate_authority=certificate_authority, ) # Make the request operation = client.update_certificate_authority(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.UpdateCertificateAuthorityRequest, dict]) – The request object. Request message for [CertificateAuthorityService.UpdateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateAuthority].
certificate_authority (google.cloud.security.privateca_v1.types.CertificateAuthority) –
Required. [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] with updated values.
This corresponds to the
certificate_authority
field on therequest
instance; ifrequest
is provided, this should not be set.update_mask (google.protobuf.field_mask_pb2.FieldMask) –
Required. A list of fields to be updated in this request.
This corresponds to the
update_mask
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.security.privateca_v1.types.CertificateAuthority
A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] represents an individual Certificate Authority. A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] can be used to create [Certificates][google.cloud.security.privateca.v1.Certificate].
- The result type for the operation will be
- Return type
- update_certificate_revocation_list(request: Optional[Union[google.cloud.security.privateca_v1.types.service.UpdateCertificateRevocationListRequest, dict]] = None, *, certificate_revocation_list: Optional[google.cloud.security.privateca_v1.types.resources.CertificateRevocationList] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation.Operation[source]¶
Update a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].
# 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.security import privateca_v1 def sample_update_certificate_revocation_list(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) request = privateca_v1.UpdateCertificateRevocationListRequest( ) # Make the request operation = client.update_certificate_revocation_list(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.UpdateCertificateRevocationListRequest, dict]) – The request object. Request message for [CertificateAuthorityService.UpdateCertificateRevocationList][google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateRevocationList].
certificate_revocation_list (google.cloud.security.privateca_v1.types.CertificateRevocationList) –
Required. [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] with updated values.
This corresponds to the
certificate_revocation_list
field on therequest
instance; ifrequest
is provided, this should not be set.update_mask (google.protobuf.field_mask_pb2.FieldMask) –
Required. A list of fields to be updated in this request.
This corresponds to the
update_mask
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.security.privateca_v1.types.CertificateRevocationList
A [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] corresponds to a signed X.509 certificate Revocation List (CRL). A CRL contains the serial numbers of certificates that should no longer be trusted.
- The result type for the operation will be
- Return type
- update_certificate_template(request: Optional[Union[google.cloud.security.privateca_v1.types.service.UpdateCertificateTemplateRequest, dict]] = None, *, certificate_template: Optional[google.cloud.security.privateca_v1.types.resources.CertificateTemplate] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation.Operation[source]¶
Update a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].
# 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.security import privateca_v1 def sample_update_certificate_template(): # Create a client client = privateca_v1.CertificateAuthorityServiceClient() # Initialize request argument(s) request = privateca_v1.UpdateCertificateTemplateRequest( ) # Make the request operation = client.update_certificate_template(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.security.privateca_v1.types.UpdateCertificateTemplateRequest, dict]) – The request object. Request message for [CertificateAuthorityService.UpdateCertificateTemplate][google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateTemplate].
certificate_template (google.cloud.security.privateca_v1.types.CertificateTemplate) –
Required. [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] with updated values.
This corresponds to the
certificate_template
field on therequest
instance; ifrequest
is provided, this should not be set.update_mask (google.protobuf.field_mask_pb2.FieldMask) –
Required. A list of fields to be updated in this request.
This corresponds to the
update_mask
field on therequest
instance; ifrequest
is provided, this should not be set.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, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.security.privateca_v1.types.CertificateTemplate
A [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] refers to a managed template for certificate issuance.
- The result type for the operation will be
- Return type
- class google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCaPoolsAsyncPager(method: Callable[[...], Awaitable[google.cloud.security.privateca_v1.types.service.ListCaPoolsResponse]], request: google.cloud.security.privateca_v1.types.service.ListCaPoolsRequest, response: google.cloud.security.privateca_v1.types.service.ListCaPoolsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_ca_pools
requests.This class thinly wraps an initial
google.cloud.security.privateca_v1.types.ListCaPoolsResponse
object, and provides an__aiter__
method to iterate through itsca_pools
field.If there are more pages, the
__aiter__
method will make additionalListCaPools
requests and continue to iterate through theca_pools
field on the corresponding responses.All the usual
google.cloud.security.privateca_v1.types.ListCaPoolsResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiates the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.security.privateca_v1.types.ListCaPoolsRequest) – The initial request object.
response (google.cloud.security.privateca_v1.types.ListCaPoolsResponse) – The initial response object.
retry (google.api_core.retry.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCaPoolsPager(method: Callable[[...], google.cloud.security.privateca_v1.types.service.ListCaPoolsResponse], request: google.cloud.security.privateca_v1.types.service.ListCaPoolsRequest, response: google.cloud.security.privateca_v1.types.service.ListCaPoolsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_ca_pools
requests.This class thinly wraps an initial
google.cloud.security.privateca_v1.types.ListCaPoolsResponse
object, and provides an__iter__
method to iterate through itsca_pools
field.If there are more pages, the
__iter__
method will make additionalListCaPools
requests and continue to iterate through theca_pools
field on the corresponding responses.All the usual
google.cloud.security.privateca_v1.types.ListCaPoolsResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiate the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.security.privateca_v1.types.ListCaPoolsRequest) – The initial request object.
response (google.cloud.security.privateca_v1.types.ListCaPoolsResponse) – The initial response object.
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, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCertificateAuthoritiesAsyncPager(method: Callable[[...], Awaitable[google.cloud.security.privateca_v1.types.service.ListCertificateAuthoritiesResponse]], request: google.cloud.security.privateca_v1.types.service.ListCertificateAuthoritiesRequest, response: google.cloud.security.privateca_v1.types.service.ListCertificateAuthoritiesResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_certificate_authorities
requests.This class thinly wraps an initial
google.cloud.security.privateca_v1.types.ListCertificateAuthoritiesResponse
object, and provides an__aiter__
method to iterate through itscertificate_authorities
field.If there are more pages, the
__aiter__
method will make additionalListCertificateAuthorities
requests and continue to iterate through thecertificate_authorities
field on the corresponding responses.All the usual
google.cloud.security.privateca_v1.types.ListCertificateAuthoritiesResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiates the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.security.privateca_v1.types.ListCertificateAuthoritiesRequest) – The initial request object.
response (google.cloud.security.privateca_v1.types.ListCertificateAuthoritiesResponse) – The initial response object.
retry (google.api_core.retry.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCertificateAuthoritiesPager(method: Callable[[...], google.cloud.security.privateca_v1.types.service.ListCertificateAuthoritiesResponse], request: google.cloud.security.privateca_v1.types.service.ListCertificateAuthoritiesRequest, response: google.cloud.security.privateca_v1.types.service.ListCertificateAuthoritiesResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_certificate_authorities
requests.This class thinly wraps an initial
google.cloud.security.privateca_v1.types.ListCertificateAuthoritiesResponse
object, and provides an__iter__
method to iterate through itscertificate_authorities
field.If there are more pages, the
__iter__
method will make additionalListCertificateAuthorities
requests and continue to iterate through thecertificate_authorities
field on the corresponding responses.All the usual
google.cloud.security.privateca_v1.types.ListCertificateAuthoritiesResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiate the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.security.privateca_v1.types.ListCertificateAuthoritiesRequest) – The initial request object.
response (google.cloud.security.privateca_v1.types.ListCertificateAuthoritiesResponse) – The initial response object.
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, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCertificateRevocationListsAsyncPager(method: Callable[[...], Awaitable[google.cloud.security.privateca_v1.types.service.ListCertificateRevocationListsResponse]], request: google.cloud.security.privateca_v1.types.service.ListCertificateRevocationListsRequest, response: google.cloud.security.privateca_v1.types.service.ListCertificateRevocationListsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_certificate_revocation_lists
requests.This class thinly wraps an initial
google.cloud.security.privateca_v1.types.ListCertificateRevocationListsResponse
object, and provides an__aiter__
method to iterate through itscertificate_revocation_lists
field.If there are more pages, the
__aiter__
method will make additionalListCertificateRevocationLists
requests and continue to iterate through thecertificate_revocation_lists
field on the corresponding responses.All the usual
google.cloud.security.privateca_v1.types.ListCertificateRevocationListsResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiates the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.security.privateca_v1.types.ListCertificateRevocationListsRequest) – The initial request object.
response (google.cloud.security.privateca_v1.types.ListCertificateRevocationListsResponse) – The initial response object.
retry (google.api_core.retry.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCertificateRevocationListsPager(method: Callable[[...], google.cloud.security.privateca_v1.types.service.ListCertificateRevocationListsResponse], request: google.cloud.security.privateca_v1.types.service.ListCertificateRevocationListsRequest, response: google.cloud.security.privateca_v1.types.service.ListCertificateRevocationListsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_certificate_revocation_lists
requests.This class thinly wraps an initial
google.cloud.security.privateca_v1.types.ListCertificateRevocationListsResponse
object, and provides an__iter__
method to iterate through itscertificate_revocation_lists
field.If there are more pages, the
__iter__
method will make additionalListCertificateRevocationLists
requests and continue to iterate through thecertificate_revocation_lists
field on the corresponding responses.All the usual
google.cloud.security.privateca_v1.types.ListCertificateRevocationListsResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiate the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.security.privateca_v1.types.ListCertificateRevocationListsRequest) – The initial request object.
response (google.cloud.security.privateca_v1.types.ListCertificateRevocationListsResponse) – The initial response object.
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, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCertificateTemplatesAsyncPager(method: Callable[[...], Awaitable[google.cloud.security.privateca_v1.types.service.ListCertificateTemplatesResponse]], request: google.cloud.security.privateca_v1.types.service.ListCertificateTemplatesRequest, response: google.cloud.security.privateca_v1.types.service.ListCertificateTemplatesResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_certificate_templates
requests.This class thinly wraps an initial
google.cloud.security.privateca_v1.types.ListCertificateTemplatesResponse
object, and provides an__aiter__
method to iterate through itscertificate_templates
field.If there are more pages, the
__aiter__
method will make additionalListCertificateTemplates
requests and continue to iterate through thecertificate_templates
field on the corresponding responses.All the usual
google.cloud.security.privateca_v1.types.ListCertificateTemplatesResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiates the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.security.privateca_v1.types.ListCertificateTemplatesRequest) – The initial request object.
response (google.cloud.security.privateca_v1.types.ListCertificateTemplatesResponse) – The initial response object.
retry (google.api_core.retry.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCertificateTemplatesPager(method: Callable[[...], google.cloud.security.privateca_v1.types.service.ListCertificateTemplatesResponse], request: google.cloud.security.privateca_v1.types.service.ListCertificateTemplatesRequest, response: google.cloud.security.privateca_v1.types.service.ListCertificateTemplatesResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_certificate_templates
requests.This class thinly wraps an initial
google.cloud.security.privateca_v1.types.ListCertificateTemplatesResponse
object, and provides an__iter__
method to iterate through itscertificate_templates
field.If there are more pages, the
__iter__
method will make additionalListCertificateTemplates
requests and continue to iterate through thecertificate_templates
field on the corresponding responses.All the usual
google.cloud.security.privateca_v1.types.ListCertificateTemplatesResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiate the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.security.privateca_v1.types.ListCertificateTemplatesRequest) – The initial request object.
response (google.cloud.security.privateca_v1.types.ListCertificateTemplatesResponse) – The initial response object.
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, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCertificatesAsyncPager(method: Callable[[...], Awaitable[google.cloud.security.privateca_v1.types.service.ListCertificatesResponse]], request: google.cloud.security.privateca_v1.types.service.ListCertificatesRequest, response: google.cloud.security.privateca_v1.types.service.ListCertificatesResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_certificates
requests.This class thinly wraps an initial
google.cloud.security.privateca_v1.types.ListCertificatesResponse
object, and provides an__aiter__
method to iterate through itscertificates
field.If there are more pages, the
__aiter__
method will make additionalListCertificates
requests and continue to iterate through thecertificates
field on the corresponding responses.All the usual
google.cloud.security.privateca_v1.types.ListCertificatesResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiates the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.security.privateca_v1.types.ListCertificatesRequest) – The initial request object.
response (google.cloud.security.privateca_v1.types.ListCertificatesResponse) – The initial response object.
retry (google.api_core.retry.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.security.privateca_v1.services.certificate_authority_service.pagers.ListCertificatesPager(method: Callable[[...], google.cloud.security.privateca_v1.types.service.ListCertificatesResponse], request: google.cloud.security.privateca_v1.types.service.ListCertificatesRequest, response: google.cloud.security.privateca_v1.types.service.ListCertificatesResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_certificates
requests.This class thinly wraps an initial
google.cloud.security.privateca_v1.types.ListCertificatesResponse
object, and provides an__iter__
method to iterate through itscertificates
field.If there are more pages, the
__iter__
method will make additionalListCertificates
requests and continue to iterate through thecertificates
field on the corresponding responses.All the usual
google.cloud.security.privateca_v1.types.ListCertificatesResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiate the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.security.privateca_v1.types.ListCertificatesRequest) – The initial request object.
response (google.cloud.security.privateca_v1.types.ListCertificatesResponse) – The initial response object.
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, str]]) – Strings which should be sent along with the request as metadata.