CertificateAuthorityServiceAsyncClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Union[str, google.cloud.security.privateca_v1beta1.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>)
[Certificate Authority Service][google.cloud.security.privateca.v1beta1.CertificateAuthorityService] manages private certificate authorities and issued certificates.
Properties
transport
Returns the transport used by the client instance.
Returns | |
---|---|
Type | Description |
CertificateAuthorityServiceTransport | The transport used by the client instance. |
Methods
CertificateAuthorityServiceAsyncClient
CertificateAuthorityServiceAsyncClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Union[str, google.cloud.security.privateca_v1beta1.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>)
Instantiates the certificate authority service client.
Parameters | |
---|---|
Name | Description |
credentials |
Optional[google.auth.credentials.Credentials]
The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment. |
transport |
Union[str,
The transport to use. If set to None, a transport is chosen automatically. |
client_options |
ClientOptions
Custom options for the client. It won't take effect if a |
Exceptions | |
---|---|
Type | Description |
google.auth.exceptions.MutualTlsChannelError | If mutual TLS transport creation failed for any reason. |
activate_certificate_authority
activate_certificate_authority(
request: typing.Optional[
typing.Union[
google.cloud.security.privateca_v1beta1.types.service.ActivateCertificateAuthorityRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Activate a xref_CertificateAuthority that is in state xref_PENDING_ACTIVATION and is of type xref_SUBORDINATE. After the parent Certificate Authority signs a certificate signing request from xref_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_v1beta1
async def sample_activate_certificate_authority():
# Create a client
client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient()
# Initialize request argument(s)
subordinate_config = privateca_v1beta1.SubordinateConfig()
subordinate_config.certificate_authority = "certificate_authority_value"
request = privateca_v1beta1.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 | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.security.privateca_v1beta1.types.ActivateCertificateAuthorityRequest, dict]]
The request object. Request message for CertificateAuthorityService.ActivateCertificateAuthority. |
name |
Required. The resource name for this CertificateAuthority in the format |
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 | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be CertificateAuthority A CertificateAuthority represents an individual Certificate Authority. A CertificateAuthority can be used to create Certificates. |
certificate_authority_path
certificate_authority_path(
project: str, location: str, certificate_authority: str
) -> str
Returns a fully-qualified certificate_authority string.
certificate_path
certificate_path(
project: str, location: str, certificate_authority: str, certificate: str
) -> str
Returns a fully-qualified certificate string.
certificate_revocation_list_path
certificate_revocation_list_path(
project: str,
location: str,
certificate_authority: str,
certificate_revocation_list: str,
) -> str
Returns a fully-qualified certificate_revocation_list string.
common_billing_account_path
common_billing_account_path(billing_account: str) -> str
Returns a fully-qualified billing_account string.
common_folder_path
common_folder_path(folder: str) -> str
Returns a fully-qualified folder string.
common_location_path
common_location_path(project: str, location: str) -> str
Returns a fully-qualified location string.
common_organization_path
common_organization_path(organization: str) -> str
Returns a fully-qualified organization string.
common_project_path
common_project_path(project: str) -> str
Returns a fully-qualified project string.
create_certificate
create_certificate(
request: typing.Optional[
typing.Union[
google.cloud.security.privateca_v1beta1.types.service.CreateCertificateRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
certificate: typing.Optional[
google.cloud.security.privateca_v1beta1.types.resources.Certificate
] = None,
certificate_id: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.security.privateca_v1beta1.types.resources.Certificate
Create a new xref_Certificate in a given Project, Location from a particular xref_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_v1beta1
async def sample_create_certificate():
# Create a client
client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient()
# Initialize request argument(s)
certificate = privateca_v1beta1.Certificate()
certificate.pem_csr = "pem_csr_value"
request = privateca_v1beta1.CreateCertificateRequest(
parent="parent_value",
certificate=certificate,
)
# Make the request
response = await client.create_certificate(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.security.privateca_v1beta1.types.CreateCertificateRequest, dict]]
The request object. Request message for CertificateAuthorityService.CreateCertificate. |
parent |
Required. The resource name of the location and CertificateAuthority associated with the Certificate, in the format |
certificate |
Certificate
Required. A Certificate with initial field values. This corresponds to the |
certificate_id |
Optional. It must be unique within a location and match the regular expression |
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 | |
---|---|
Type | Description |
google.cloud.security.privateca_v1beta1.types.Certificate | A Certificate corresponds to a signed X.509 certificate issued by a CertificateAuthority. |
create_certificate_authority
create_certificate_authority(
request: typing.Optional[
typing.Union[
google.cloud.security.privateca_v1beta1.types.service.CreateCertificateAuthorityRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
certificate_authority: typing.Optional[
google.cloud.security.privateca_v1beta1.types.resources.CertificateAuthority
] = None,
certificate_authority_id: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Create a new xref_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_v1beta1
async def sample_create_certificate_authority():
# Create a client
client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient()
# Initialize request argument(s)
certificate_authority = privateca_v1beta1.CertificateAuthority()
certificate_authority.type_ = "SUBORDINATE"
certificate_authority.tier = "DEVOPS"
certificate_authority.config.reusable_config.reusable_config = "reusable_config_value"
certificate_authority.key_spec.cloud_kms_key_version = "cloud_kms_key_version_value"
request = privateca_v1beta1.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 | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.security.privateca_v1beta1.types.CreateCertificateAuthorityRequest, dict]]
The request object. Request message for CertificateAuthorityService.CreateCertificateAuthority. |
parent |
Required. The resource name of the location associated with the CertificateAuthorities, in the format |
certificate_authority |
CertificateAuthority
Required. A CertificateAuthority with initial field values. This corresponds to the |
certificate_authority_id |
Required. It must be unique within a location and match the regular expression |
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 | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be CertificateAuthority A CertificateAuthority represents an individual Certificate Authority. A CertificateAuthority can be used to create Certificates. |
disable_certificate_authority
disable_certificate_authority(
request: typing.Optional[
typing.Union[
google.cloud.security.privateca_v1beta1.types.service.DisableCertificateAuthorityRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Disable a xref_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_v1beta1
async def sample_disable_certificate_authority():
# Create a client
client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient()
# Initialize request argument(s)
request = privateca_v1beta1.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 | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.security.privateca_v1beta1.types.DisableCertificateAuthorityRequest, dict]]
The request object. Request message for CertificateAuthorityService.DisableCertificateAuthority. |
name |
Required. The resource name for this CertificateAuthority in the format |
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 | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be CertificateAuthority A CertificateAuthority represents an individual Certificate Authority. A CertificateAuthority can be used to create Certificates. |
enable_certificate_authority
enable_certificate_authority(
request: typing.Optional[
typing.Union[
google.cloud.security.privateca_v1beta1.types.service.EnableCertificateAuthorityRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Enable a xref_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_v1beta1
async def sample_enable_certificate_authority():
# Create a client
client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient()
# Initialize request argument(s)
request = privateca_v1beta1.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 | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.security.privateca_v1beta1.types.EnableCertificateAuthorityRequest, dict]]
The request object. Request message for CertificateAuthorityService.EnableCertificateAuthority. |
name |
Required. The resource name for this CertificateAuthority in the format |
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 | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be CertificateAuthority A CertificateAuthority represents an individual Certificate Authority. A CertificateAuthority can be used to create Certificates. |
fetch_certificate_authority_csr
fetch_certificate_authority_csr(
request: typing.Optional[
typing.Union[
google.cloud.security.privateca_v1beta1.types.service.FetchCertificateAuthorityCsrRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
google.cloud.security.privateca_v1beta1.types.service.FetchCertificateAuthorityCsrResponse
)
Fetch a certificate signing request (CSR) from a xref_CertificateAuthority that is in state xref_PENDING_ACTIVATION and is of type xref_SUBORDINATE. The CSR must then be signed by the desired parent Certificate Authority, which could be another xref_CertificateAuthority resource, or could be an on-prem certificate authority. See also xref_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_v1beta1
async def sample_fetch_certificate_authority_csr():
# Create a client
client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient()
# Initialize request argument(s)
request = privateca_v1beta1.FetchCertificateAuthorityCsrRequest(
name="name_value",
)
# Make the request
response = await client.fetch_certificate_authority_csr(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.security.privateca_v1beta1.types.FetchCertificateAuthorityCsrRequest, dict]]
The request object. Request message for CertificateAuthorityService.FetchCertificateAuthorityCsr. |
name |
Required. The resource name for this CertificateAuthority in the format |
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 | |
---|---|
Type | Description |
google.cloud.security.privateca_v1beta1.types.FetchCertificateAuthorityCsrResponse | Response message for CertificateAuthorityService.FetchCertificateAuthorityCsr. |
from_service_account_file
from_service_account_file(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
Parameter | |
---|---|
Name | Description |
filename |
str
The path to the service account private key json file. |
Returns | |
---|---|
Type | Description |
CertificateAuthorityServiceAsyncClient | The constructed client. |
from_service_account_info
from_service_account_info(info: dict, *args, **kwargs)
Creates an instance of this client using the provided credentials info.
Parameter | |
---|---|
Name | Description |
info |
dict
The service account private key info. |
Returns | |
---|---|
Type | Description |
CertificateAuthorityServiceAsyncClient | The constructed client. |
from_service_account_json
from_service_account_json(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
Parameter | |
---|---|
Name | Description |
filename |
str
The path to the service account private key json file. |
Returns | |
---|---|
Type | Description |
CertificateAuthorityServiceAsyncClient | The constructed client. |
get_certificate
get_certificate(
request: typing.Optional[
typing.Union[
google.cloud.security.privateca_v1beta1.types.service.GetCertificateRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.security.privateca_v1beta1.types.resources.Certificate
Returns a xref_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_v1beta1
async def sample_get_certificate():
# Create a client
client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient()
# Initialize request argument(s)
request = privateca_v1beta1.GetCertificateRequest(
name="name_value",
)
# Make the request
response = await client.get_certificate(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.security.privateca_v1beta1.types.GetCertificateRequest, dict]]
The request object. Request message for CertificateAuthorityService.GetCertificate. |
name |
Required. The name of the Certificate to get. This corresponds to the |
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 | |
---|---|
Type | Description |
google.cloud.security.privateca_v1beta1.types.Certificate | A Certificate corresponds to a signed X.509 certificate issued by a CertificateAuthority. |
get_certificate_authority
get_certificate_authority(
request: typing.Optional[
typing.Union[
google.cloud.security.privateca_v1beta1.types.service.GetCertificateAuthorityRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.security.privateca_v1beta1.types.resources.CertificateAuthority
Returns a xref_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_v1beta1
async def sample_get_certificate_authority():
# Create a client
client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient()
# Initialize request argument(s)
request = privateca_v1beta1.GetCertificateAuthorityRequest(
name="name_value",
)
# Make the request
response = await client.get_certificate_authority(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.security.privateca_v1beta1.types.GetCertificateAuthorityRequest, dict]]
The request object. Request message for CertificateAuthorityService.GetCertificateAuthority. |
name |
Required. The name of the CertificateAuthority to get. This corresponds to the |
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 | |
---|---|
Type | Description |
google.cloud.security.privateca_v1beta1.types.CertificateAuthority | A CertificateAuthority represents an individual Certificate Authority. A CertificateAuthority can be used to create Certificates. |
get_certificate_revocation_list
get_certificate_revocation_list(
request: typing.Optional[
typing.Union[
google.cloud.security.privateca_v1beta1.types.service.GetCertificateRevocationListRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.security.privateca_v1beta1.types.resources.CertificateRevocationList
Returns a xref_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_v1beta1
async def sample_get_certificate_revocation_list():
# Create a client
client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient()
# Initialize request argument(s)
request = privateca_v1beta1.GetCertificateRevocationListRequest(
name="name_value",
)
# Make the request
response = await client.get_certificate_revocation_list(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.security.privateca_v1beta1.types.GetCertificateRevocationListRequest, dict]]
The request object. Request message for CertificateAuthorityService.GetCertificateRevocationList. |
name |
Required. The name of the CertificateRevocationList to get. This corresponds to the |
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 | |
---|---|
Type | Description |
google.cloud.security.privateca_v1beta1.types.CertificateRevocationList | A 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. |
get_mtls_endpoint_and_cert_source
get_mtls_endpoint_and_cert_source(
client_options: typing.Optional[
google.api_core.client_options.ClientOptions
] = None,
)
Return the API endpoint and client cert source for mutual TLS.
The client cert source is determined in the following order:
(1) if GOOGLE_API_USE_CLIENT_CERTIFICATE
environment variable is not "true", the
client cert source is None.
(2) if client_options.client_cert_source
is provided, use the provided one; if the
default client cert source exists, use the default one; otherwise the client cert
source is None.
The API endpoint is determined in the following order:
(1) if client_options.api_endpoint
if provided, use the provided one.
(2) if GOOGLE_API_USE_CLIENT_CERTIFICATE
environment variable is "always", use the
default mTLS endpoint; if the environment variable is "never", use the default API
endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise
use the default API endpoint.
More details can be found at https://google.aip.dev/auth/4114.
Parameter | |
---|---|
Name | Description |
client_options |
google.api_core.client_options.ClientOptions
Custom options for the client. Only the |
Exceptions | |
---|---|
Type | Description |
google.auth.exceptions.MutualTLSChannelError | If any errors happen. |
Returns | |
---|---|
Type | Description |
Tuple[str, Callable[[], Tuple[bytes, bytes]]] | returns the API endpoint and the client cert source to use. |
get_reusable_config
get_reusable_config(
request: typing.Optional[
typing.Union[
google.cloud.security.privateca_v1beta1.types.service.GetReusableConfigRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.security.privateca_v1beta1.types.resources.ReusableConfig
Returns a xref_ReusableConfig.
# 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_v1beta1
async def sample_get_reusable_config():
# Create a client
client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient()
# Initialize request argument(s)
request = privateca_v1beta1.GetReusableConfigRequest(
name="name_value",
)
# Make the request
response = await client.get_reusable_config(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.security.privateca_v1beta1.types.GetReusableConfigRequest, dict]]
The request object. Request message for CertificateAuthorityService.GetReusableConfig. |
name |
Required. The |
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 | |
---|---|
Type | Description |
google.cloud.security.privateca_v1beta1.types.ReusableConfig | A ReusableConfig refers to a managed ReusableConfigValues. Those, in turn, are used to describe certain fields of an X.509 certificate, such as the key usage fields, fields specific to CA certificates, certificate policy extensions and custom extensions. |
get_transport_class
get_transport_class() -> (
typing.Type[
google.cloud.security.privateca_v1beta1.services.certificate_authority_service.transports.base.CertificateAuthorityServiceTransport
]
)
Returns an appropriate transport class.
Parameter | |
---|---|
Name | Description |
label |
typing.Optional[str]
The name of the desired transport. If none is provided, then the first transport in the registry is used. |
list_certificate_authorities
list_certificate_authorities(
request: typing.Optional[
typing.Union[
google.cloud.security.privateca_v1beta1.types.service.ListCertificateAuthoritiesRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
google.cloud.security.privateca_v1beta1.services.certificate_authority_service.pagers.ListCertificateAuthoritiesAsyncPager
)
Lists xref_CertificateAuthorities.
# 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_v1beta1
async def sample_list_certificate_authorities():
# Create a client
client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient()
# Initialize request argument(s)
request = privateca_v1beta1.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 | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.security.privateca_v1beta1.types.ListCertificateAuthoritiesRequest, dict]]
The request object. Request message for CertificateAuthorityService.ListCertificateAuthorities. |
parent |
Required. The resource name of the location associated with the CertificateAuthorities, in the format |
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 | |
---|---|
Type | Description |
google.cloud.security.privateca_v1beta1.services.certificate_authority_service.pagers.ListCertificateAuthoritiesAsyncPager | Response message for CertificateAuthorityService.ListCertificateAuthorities. Iterating over this object will yield results and resolve additional pages automatically. |
list_certificate_revocation_lists
list_certificate_revocation_lists(
request: typing.Optional[
typing.Union[
google.cloud.security.privateca_v1beta1.types.service.ListCertificateRevocationListsRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
google.cloud.security.privateca_v1beta1.services.certificate_authority_service.pagers.ListCertificateRevocationListsAsyncPager
)
Lists xref_CertificateRevocationLists.
# 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_v1beta1
async def sample_list_certificate_revocation_lists():
# Create a client
client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient()
# Initialize request argument(s)
request = privateca_v1beta1.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 | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.security.privateca_v1beta1.types.ListCertificateRevocationListsRequest, dict]]
The request object. Request message for CertificateAuthorityService.ListCertificateRevocationLists. |
parent |
Required. The resource name of the location associated with the CertificateRevocationLists, in the format |
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 | |
---|---|
Type | Description |
google.cloud.security.privateca_v1beta1.services.certificate_authority_service.pagers.ListCertificateRevocationListsAsyncPager | Response message for CertificateAuthorityService.ListCertificateRevocationLists. Iterating over this object will yield results and resolve additional pages automatically. |
list_certificates
list_certificates(
request: typing.Optional[
typing.Union[
google.cloud.security.privateca_v1beta1.types.service.ListCertificatesRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
google.cloud.security.privateca_v1beta1.services.certificate_authority_service.pagers.ListCertificatesAsyncPager
)
Lists xref_Certificates.
# 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_v1beta1
async def sample_list_certificates():
# Create a client
client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient()
# Initialize request argument(s)
request = privateca_v1beta1.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 | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.security.privateca_v1beta1.types.ListCertificatesRequest, dict]]
The request object. Request message for CertificateAuthorityService.ListCertificates. |
parent |
Required. The resource name of the location associated with the Certificates, in the format |
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 | |
---|---|
Type | Description |
google.cloud.security.privateca_v1beta1.services.certificate_authority_service.pagers.ListCertificatesAsyncPager | Response message for CertificateAuthorityService.ListCertificates. Iterating over this object will yield results and resolve additional pages automatically. |
list_reusable_configs
list_reusable_configs(
request: typing.Optional[
typing.Union[
google.cloud.security.privateca_v1beta1.types.service.ListReusableConfigsRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
google.cloud.security.privateca_v1beta1.services.certificate_authority_service.pagers.ListReusableConfigsAsyncPager
)
Lists xref_ReusableConfigs.
# 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_v1beta1
async def sample_list_reusable_configs():
# Create a client
client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient()
# Initialize request argument(s)
request = privateca_v1beta1.ListReusableConfigsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_reusable_configs(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.security.privateca_v1beta1.types.ListReusableConfigsRequest, dict]]
The request object. Request message for CertificateAuthorityService.ListReusableConfigs. |
parent |
Required. The resource name of the location associated with the ReusableConfigs, in the format |
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 | |
---|---|
Type | Description |
google.cloud.security.privateca_v1beta1.services.certificate_authority_service.pagers.ListReusableConfigsAsyncPager | Response message for CertificateAuthorityService.ListReusableConfigs. Iterating over this object will yield results and resolve additional pages automatically. |
parse_certificate_authority_path
parse_certificate_authority_path(path: str) -> typing.Dict[str, str]
Parses a certificate_authority path into its component segments.
parse_certificate_path
parse_certificate_path(path: str) -> typing.Dict[str, str]
Parses a certificate path into its component segments.
parse_certificate_revocation_list_path
parse_certificate_revocation_list_path(path: str) -> typing.Dict[str, str]
Parses a certificate_revocation_list path into its component segments.
parse_common_billing_account_path
parse_common_billing_account_path(path: str) -> typing.Dict[str, str]
Parse a billing_account path into its component segments.
parse_common_folder_path
parse_common_folder_path(path: str) -> typing.Dict[str, str]
Parse a folder path into its component segments.
parse_common_location_path
parse_common_location_path(path: str) -> typing.Dict[str, str]
Parse a location path into its component segments.
parse_common_organization_path
parse_common_organization_path(path: str) -> typing.Dict[str, str]
Parse a organization path into its component segments.
parse_common_project_path
parse_common_project_path(path: str) -> typing.Dict[str, str]
Parse a project path into its component segments.
parse_reusable_config_path
parse_reusable_config_path(path: str) -> typing.Dict[str, str]
Parses a reusable_config path into its component segments.
restore_certificate_authority
restore_certificate_authority(
request: typing.Optional[
typing.Union[
google.cloud.security.privateca_v1beta1.types.service.RestoreCertificateAuthorityRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Restore a xref_CertificateAuthority that is scheduled for deletion.
# 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_v1beta1
async def sample_restore_certificate_authority():
# Create a client
client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient()
# Initialize request argument(s)
request = privateca_v1beta1.RestoreCertificateAuthorityRequest(
name="name_value",
)
# Make the request
operation = client.restore_certificate_authority(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.security.privateca_v1beta1.types.RestoreCertificateAuthorityRequest, dict]]
The request object. Request message for CertificateAuthorityService.RestoreCertificateAuthority. |
name |
Required. The resource name for this CertificateAuthority in the format |
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 | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be CertificateAuthority A CertificateAuthority represents an individual Certificate Authority. A CertificateAuthority can be used to create Certificates. |
reusable_config_path
reusable_config_path(project: str, location: str, reusable_config: str) -> str
Returns a fully-qualified reusable_config string.
revoke_certificate
revoke_certificate(
request: typing.Optional[
typing.Union[
google.cloud.security.privateca_v1beta1.types.service.RevokeCertificateRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.security.privateca_v1beta1.types.resources.Certificate
Revoke a xref_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_v1beta1
async def sample_revoke_certificate():
# Create a client
client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient()
# Initialize request argument(s)
request = privateca_v1beta1.RevokeCertificateRequest(
name="name_value",
reason="ATTRIBUTE_AUTHORITY_COMPROMISE",
)
# Make the request
response = await client.revoke_certificate(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.security.privateca_v1beta1.types.RevokeCertificateRequest, dict]]
The request object. Request message for CertificateAuthorityService.RevokeCertificate. |
name |
Required. The resource name for this Certificate in the format |
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 | |
---|---|
Type | Description |
google.cloud.security.privateca_v1beta1.types.Certificate | A Certificate corresponds to a signed X.509 certificate issued by a CertificateAuthority. |
schedule_delete_certificate_authority
schedule_delete_certificate_authority(
request: typing.Optional[
typing.Union[
google.cloud.security.privateca_v1beta1.types.service.ScheduleDeleteCertificateAuthorityRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Schedule a xref_CertificateAuthority for deletion.
# 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_v1beta1
async def sample_schedule_delete_certificate_authority():
# Create a client
client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient()
# Initialize request argument(s)
request = privateca_v1beta1.ScheduleDeleteCertificateAuthorityRequest(
name="name_value",
)
# Make the request
operation = client.schedule_delete_certificate_authority(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.security.privateca_v1beta1.types.ScheduleDeleteCertificateAuthorityRequest, dict]]
The request object. Request message for CertificateAuthorityService.ScheduleDeleteCertificateAuthority. |
name |
Required. The resource name for this CertificateAuthority in the format |
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 | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be CertificateAuthority A CertificateAuthority represents an individual Certificate Authority. A CertificateAuthority can be used to create Certificates. |
update_certificate
update_certificate(
request: typing.Optional[
typing.Union[
google.cloud.security.privateca_v1beta1.types.service.UpdateCertificateRequest,
dict,
]
] = None,
*,
certificate: typing.Optional[
google.cloud.security.privateca_v1beta1.types.resources.Certificate
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Union[
google.api_core.retry_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.security.privateca_v1beta1.types.resources.Certificate
Update a xref_Certificate. Currently, the only field you can update is the xref_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_v1beta1
async def sample_update_certificate():
# Create a client
client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient()
# Initialize request argument(s)
certificate = privateca_v1beta1.Certificate()
certificate.pem_csr = "pem_csr_value"
request = privateca_v1beta1.UpdateCertificateRequest(
certificate=certificate,
)
# Make the request
response = await client.update_certificate(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.security.privateca_v1beta1.types.UpdateCertificateRequest, dict]]
The request object. Request message for CertificateAuthorityService.UpdateCertificate. |
certificate |
Certificate
Required. Certificate with updated values. This corresponds to the |
update_mask |
Required. A list of fields to be updated in this request. This corresponds to the |
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 | |
---|---|
Type | Description |
google.cloud.security.privateca_v1beta1.types.Certificate | A Certificate corresponds to a signed X.509 certificate issued by a CertificateAuthority. |
update_certificate_authority
update_certificate_authority(
request: typing.Optional[
typing.Union[
google.cloud.security.privateca_v1beta1.types.service.UpdateCertificateAuthorityRequest,
dict,
]
] = None,
*,
certificate_authority: typing.Optional[
google.cloud.security.privateca_v1beta1.types.resources.CertificateAuthority
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Union[
google.api_core.retry_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Update a xref_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_v1beta1
async def sample_update_certificate_authority():
# Create a client
client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient()
# Initialize request argument(s)
certificate_authority = privateca_v1beta1.CertificateAuthority()
certificate_authority.type_ = "SUBORDINATE"
certificate_authority.tier = "DEVOPS"
certificate_authority.config.reusable_config.reusable_config = "reusable_config_value"
certificate_authority.key_spec.cloud_kms_key_version = "cloud_kms_key_version_value"
request = privateca_v1beta1.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 | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.security.privateca_v1beta1.types.UpdateCertificateAuthorityRequest, dict]]
The request object. Request message for CertificateAuthorityService.UpdateCertificateAuthority. |
certificate_authority |
CertificateAuthority
Required. CertificateAuthority with updated values. This corresponds to the |
update_mask |
Required. A list of fields to be updated in this request. This corresponds to the |
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 | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be CertificateAuthority A CertificateAuthority represents an individual Certificate Authority. A CertificateAuthority can be used to create Certificates. |
update_certificate_revocation_list
update_certificate_revocation_list(
request: typing.Optional[
typing.Union[
google.cloud.security.privateca_v1beta1.types.service.UpdateCertificateRevocationListRequest,
dict,
]
] = None,
*,
certificate_revocation_list: typing.Optional[
google.cloud.security.privateca_v1beta1.types.resources.CertificateRevocationList
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Union[
google.api_core.retry_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Update a xref_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_v1beta1
async def sample_update_certificate_revocation_list():
# Create a client
client = privateca_v1beta1.CertificateAuthorityServiceAsyncClient()
# Initialize request argument(s)
request = privateca_v1beta1.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 | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.security.privateca_v1beta1.types.UpdateCertificateRevocationListRequest, dict]]
The request object. Request message for CertificateAuthorityService.UpdateCertificateRevocationList. |
certificate_revocation_list |
CertificateRevocationList
Required. CertificateRevocationList with updated values. This corresponds to the |
update_mask |
Required. A list of fields to be updated in this request. This corresponds to the |
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 | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be CertificateRevocationList A 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. |