AuditManagerAsyncClient(
*,
credentials: typing.Optional[google.auth.credentials.Credentials] = None,
transport: typing.Optional[
typing.Union[
str,
google.cloud.auditmanager_v1.services.audit_manager.transports.base.AuditManagerTransport,
typing.Callable[
[...],
google.cloud.auditmanager_v1.services.audit_manager.transports.base.AuditManagerTransport,
],
]
] = "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
)Service describing handlers for resources
Properties
api_endpoint
Return the API endpoint used by the client instance.
| Returns | |
|---|---|
| Type | Description |
str |
The API endpoint used by the client instance. |
transport
Returns the transport used by the client instance.
| Returns | |
|---|---|
| Type | Description |
AuditManagerTransport |
The transport used by the client instance. |
universe_domain
Return the universe domain used by the client instance.
| Returns | |
|---|---|
| Type | Description |
str |
The universe domain used by the client instance. |
Methods
AuditManagerAsyncClient
AuditManagerAsyncClient(
*,
credentials: typing.Optional[google.auth.credentials.Credentials] = None,
transport: typing.Optional[
typing.Union[
str,
google.cloud.auditmanager_v1.services.audit_manager.transports.base.AuditManagerTransport,
typing.Callable[
[...],
google.cloud.auditmanager_v1.services.audit_manager.transports.base.AuditManagerTransport,
],
]
] = "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
)Instantiates the audit manager async client.
| Parameters | |
|---|---|
| Name | Description |
credentials |
Optional[google.auth.credentials.Credentials]
The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment. |
transport |
Optional[Union[str,AuditManagerTransport,Callable[..., AuditManagerTransport]]]
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 AuditManagerTransport constructor. If set to None, a transport is chosen automatically. |
client_options |
Optional[Union[google.api_core.client_options.ClientOptions, dict]]
Custom options for the client. 1. The |
client_info |
google.api_core.gapic_v1.client_info.ClientInfo
The client info used to send a user-agent string along with API requests. If |
| Exceptions | |
|---|---|
| Type | Description |
google.auth.exceptions.MutualTlsChannelError |
If mutual TLS transport creation failed for any reason. |
audit_report_path
audit_report_path(project: str, location: str, audit_report: str) -> strReturns a fully-qualified audit_report string.
audit_scope_report_path
audit_scope_report_path(
project: str, location: str, audit_scope_report: str
) -> strReturns a fully-qualified audit_scope_report string.
cancel_operation
cancel_operation(
request: typing.Optional[
typing.Union[google.longrunning.operations_pb2.CancelOperationRequest, dict]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_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, typing.Union[str, bytes]]] = ()
) -> NoneStarts 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 | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
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, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
common_billing_account_path
common_billing_account_path(billing_account: str) -> strReturns a fully-qualified billing_account string.
common_folder_path
common_folder_path(folder: str) -> strReturns a fully-qualified folder string.
common_location_path
common_location_path(project: str, location: str) -> strReturns a fully-qualified location string.
common_organization_path
common_organization_path(organization: str) -> strReturns a fully-qualified organization string.
common_project_path
common_project_path(project: str) -> strReturns a fully-qualified project string.
delete_operation
delete_operation(
request: typing.Optional[
typing.Union[google.longrunning.operations_pb2.DeleteOperationRequest, dict]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_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, typing.Union[str, bytes]]] = ()
) -> NoneDeletes 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 | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
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, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
enroll_resource
enroll_resource(
request: typing.Optional[
typing.Union[
google.cloud.auditmanager_v1.types.auditmanager.EnrollResourceRequest, dict
]
] = None,
*,
scope: typing.Optional[str] = None,
destinations: typing.Optional[
typing.MutableSequence[
google.cloud.auditmanager_v1.types.auditmanager.EnrollResourceRequest.EligibleDestination
]
] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_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, typing.Union[str, bytes]]] = ()
) -> google.cloud.auditmanager_v1.types.auditmanager.EnrollmentAdds your project, folder, or organization to Audit Manager. This method creates the Audit Manager service agent in your workload and grants required permissions to the service agent. If you make this request on a workload that's already enrolled, then this method overrides the existing set of destinations.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import auditmanager_v1
async def sample_enroll_resource():
# Create a client
client = auditmanager_v1.AuditManagerAsyncClient()
# Initialize request argument(s)
destinations = auditmanager_v1.EligibleDestination()
destinations.eligible_gcs_bucket = "eligible_gcs_bucket_value"
request = auditmanager_v1.EnrollResourceRequest(
scope="scope_value",
destinations=destinations,
)
# Make the request
response = await client.enroll_resource(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.auditmanager_v1.types.EnrollResourceRequest, dict]]
The request object. Request message for EnrollResource. |
scope |
Required. Organization, folder, or project to enroll in Audit Manager, in one of the following formats: - |
destinations |
:class:
Required. Cloud Storage buckets that you can upload your audit reports to during the audit process. When you enroll an organization or folder, you can choose a Cloud Storage bucket from any project in the organization or folder. If you run an audit at the project level using the service agent at the organization or folder level, all the buckets that are associated with the service agent are available. 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, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.auditmanager_v1.types.Enrollment |
Organization, folder, or project to enroll for audit reports. |
enrollment_path
enrollment_path(project: str, location: str, enrollment: str) -> strReturns a fully-qualified enrollment string.
enrollment_status_scope_path
enrollment_status_scope_path(folder: str, location: str) -> strReturns a fully-qualified enrollment_status_scope string.
from_service_account_file
from_service_account_file(filename: str, *args, **kwargs)Creates an instance of this client using the provided credentials file.
| Parameter | |
|---|---|
| Name | Description |
filename |
str
The path to the service account private key json file. |
| Returns | |
|---|---|
| Type | Description |
AuditManagerAsyncClient |
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 |
AuditManagerAsyncClient |
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 |
AuditManagerAsyncClient |
The constructed client. |
generate_audit_report
generate_audit_report(
request: typing.Optional[
typing.Union[
google.cloud.auditmanager_v1.types.auditmanager.GenerateAuditReportRequest,
dict,
]
] = None,
*,
scope: typing.Optional[str] = None,
gcs_uri: typing.Optional[str] = None,
compliance_standard: typing.Optional[str] = None,
report_format: typing.Optional[
google.cloud.auditmanager_v1.types.auditmanager.GenerateAuditReportRequest.AuditReportFormat
] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_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, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperationRegisters audit report generation requests. This method returns the operation identifier that you can use to track the report generation progress.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import auditmanager_v1
async def sample_generate_audit_report():
# Create a client
client = auditmanager_v1.AuditManagerAsyncClient()
# Initialize request argument(s)
request = auditmanager_v1.GenerateAuditReportRequest(
gcs_uri="gcs_uri_value",
scope="scope_value",
report_format="AUDIT_REPORT_FORMAT_ODF",
compliance_framework="compliance_framework_value",
)
# Make the request
operation = await client.generate_audit_report(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.auditmanager_v1.types.GenerateAuditReportRequest, dict]]
The request object. Request message for GenerateAuditReport. |
scope |
Required. Organization, folder, or project that the audit applies to, in one of the following formats: - |
gcs_uri |
URL for the Cloud Storage bucket where the report and evidence is uploaded. You must select a bucket that was provided during the enrollment process. This corresponds to the |
compliance_standard |
Optional. Deprecated. Compliance standard for the audit report. Use the |
report_format |
AuditReportFormat
Required. Format for the audit report. 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, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be AuditReport An audit report. |
generate_audit_scope_report
generate_audit_scope_report(
request: typing.Optional[
typing.Union[
google.cloud.auditmanager_v1.types.auditmanager.GenerateAuditScopeReportRequest,
dict,
]
] = None,
*,
scope: typing.Optional[str] = None,
compliance_standard: typing.Optional[str] = None,
report_format: typing.Optional[
google.cloud.auditmanager_v1.types.auditmanager.GenerateAuditScopeReportRequest.AuditScopeReportFormat
] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_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, typing.Union[str, bytes]]] = ()
) -> google.cloud.auditmanager_v1.types.auditmanager.AuditScopeReportGenerates an audit scope report for the given standard.
The report includes the following:
- The technical attributes and constraints that Audit Manager uses to verify your compliance with a framework.
- A list of Google Cloud services and resources that are within the scope of the framework.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import auditmanager_v1
async def sample_generate_audit_scope_report():
# Create a client
client = auditmanager_v1.AuditManagerAsyncClient()
# Initialize request argument(s)
request = auditmanager_v1.GenerateAuditScopeReportRequest(
scope="scope_value",
report_format="AUDIT_SCOPE_REPORT_FORMAT_ODF",
compliance_framework="compliance_framework_value",
)
# Make the request
response = await client.generate_audit_scope_report(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.auditmanager_v1.types.GenerateAuditScopeReportRequest, dict]]
The request object. Request message for GenerateAuditScopeReport. |
scope |
Required. Project or folder that the audit scope report is generated for, in one of the following formats: - |
compliance_standard |
Optional. Deprecated. The standard (industry or regulatory requirements) that the audit scope report is run against. Use the |
report_format |
AuditScopeReportFormat
Required. Format for the audit scope report. 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, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.auditmanager_v1.types.AuditScopeReport |
Audit scope report. |
get_audit_report
get_audit_report(
request: typing.Optional[
typing.Union[
google.cloud.auditmanager_v1.types.auditmanager.GetAuditReportRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_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, typing.Union[str, bytes]]] = ()
) -> google.cloud.auditmanager_v1.types.auditmanager.AuditReportGets the full metadata and findings for an audit report.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import auditmanager_v1
async def sample_get_audit_report():
# Create a client
client = auditmanager_v1.AuditManagerAsyncClient()
# Initialize request argument(s)
request = auditmanager_v1.GetAuditReportRequest(
name="name_value",
)
# Make the request
response = await client.get_audit_report(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.auditmanager_v1.types.GetAuditReportRequest, dict]]
The request object. Request message for GetAuditReport. |
name |
Required. Name of the audit report, in one of the following formats: - |
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, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.auditmanager_v1.types.AuditReport |
An audit report. |
get_location
get_location(
request: typing.Optional[
typing.Union[google.cloud.location.locations_pb2.GetLocationRequest, dict]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_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, typing.Union[str, bytes]]] = ()
) -> google.cloud.location.locations_pb2.LocationGets information about a location.
| Parameters | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
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, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
|
Location object. |
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_operation
get_operation(
request: typing.Optional[
typing.Union[google.longrunning.operations_pb2.GetOperationRequest, dict]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_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, typing.Union[str, bytes]]] = ()
) -> google.longrunning.operations_pb2.OperationGets the latest state of a long-running operation.
| Parameters | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
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, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
|
An Operation object. |
get_resource_enrollment_status
get_resource_enrollment_status(
request: typing.Optional[
typing.Union[
google.cloud.auditmanager_v1.types.auditmanager.GetResourceEnrollmentStatusRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_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, typing.Union[str, bytes]]] = ()
) -> google.cloud.auditmanager_v1.types.auditmanager.ResourceEnrollmentStatusGets a resource and its enrollment status.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import auditmanager_v1
async def sample_get_resource_enrollment_status():
# Create a client
client = auditmanager_v1.AuditManagerAsyncClient()
# Initialize request argument(s)
request = auditmanager_v1.GetResourceEnrollmentStatusRequest(
name="name_value",
)
# Make the request
response = await client.get_resource_enrollment_status(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.auditmanager_v1.types.GetResourceEnrollmentStatusRequest, dict]]
The request object. Request message for GetResourceEnrollmentStatus. |
name |
Required. Name of the resource enrollment status, in one of the following formats: - |
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, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.auditmanager_v1.types.ResourceEnrollmentStatus |
An organization, folder, or project with its enrollment status. |
get_transport_class
get_transport_class(
label: typing.Optional[str] = None,
) -> typing.Type[
google.cloud.auditmanager_v1.services.audit_manager.transports.base.AuditManagerTransport
]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_audit_reports
list_audit_reports(
request: typing.Optional[
typing.Union[
google.cloud.auditmanager_v1.types.auditmanager.ListAuditReportsRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_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, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.auditmanager_v1.services.audit_manager.pagers.ListAuditReportsAsyncPager
)Lists the audit reports for the organization, folder, or project that you specify as the parent scope.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import auditmanager_v1
async def sample_list_audit_reports():
# Create a client
client = auditmanager_v1.AuditManagerAsyncClient()
# Initialize request argument(s)
request = auditmanager_v1.ListAuditReportsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_audit_reports(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.auditmanager_v1.types.ListAuditReportsRequest, dict]]
The request object. Request message for ListAuditReports. |
parent |
Required. Parent organization, folder, or project to list reports for, in one of the following formats: - |
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, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.auditmanager_v1.services.audit_manager.pagers.ListAuditReportsAsyncPager |
Response message for ListAuditReports. Iterating over this object will yield results and resolve additional pages automatically. |
list_controls
list_controls(
request: typing.Optional[
typing.Union[
google.cloud.auditmanager_v1.types.auditmanager.ListControlsRequest, dict
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_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, typing.Union[str, bytes]]] = ()
) -> google.cloud.auditmanager_v1.services.audit_manager.pagers.ListControlsAsyncPagerLists the controls that you must implement to become compliant to a regulatory standard.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import auditmanager_v1
async def sample_list_controls():
# Create a client
client = auditmanager_v1.AuditManagerAsyncClient()
# Initialize request argument(s)
request = auditmanager_v1.ListControlsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_controls(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.auditmanager_v1.types.ListControlsRequest, dict]]
The request object. Request message for ListControls. |
parent |
Required. Standard to list controls for, in one of the following formats: - |
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, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.auditmanager_v1.services.audit_manager.pagers.ListControlsAsyncPager |
Response message for ListControls. Iterating over this object will yield results and resolve additional pages automatically. |
list_locations
list_locations(
request: typing.Optional[
typing.Union[google.cloud.location.locations_pb2.ListLocationsRequest, dict]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_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, typing.Union[str, bytes]]] = ()
) -> google.cloud.location.locations_pb2.ListLocationsResponseLists information about the supported locations for this service.
| Parameters | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
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, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
|
Response message for ListLocations method. |
list_operations
list_operations(
request: typing.Optional[
typing.Union[google.longrunning.operations_pb2.ListOperationsRequest, dict]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_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, typing.Union[str, bytes]]] = ()
) -> google.longrunning.operations_pb2.ListOperationsResponseLists operations that match the specified filter in the request.
| Parameters | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
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, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
|
Response message for ListOperations method. |
list_resource_enrollment_statuses
list_resource_enrollment_statuses(
request: typing.Optional[
typing.Union[
google.cloud.auditmanager_v1.types.auditmanager.ListResourceEnrollmentStatusesRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_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, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.auditmanager_v1.services.audit_manager.pagers.ListResourceEnrollmentStatusesAsyncPager
)Lists all the folders and projects in an organization or folder, along with their enrollments.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import auditmanager_v1
async def sample_list_resource_enrollment_statuses():
# Create a client
client = auditmanager_v1.AuditManagerAsyncClient()
# Initialize request argument(s)
request = auditmanager_v1.ListResourceEnrollmentStatusesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_resource_enrollment_statuses(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.auditmanager_v1.types.ListResourceEnrollmentStatusesRequest, dict]]
The request object. Request message for ListResourceEnrollmentStatuses. |
parent |
Required. Parent organization or folder to list enrollment statuses for, in one of the following formats: - |
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, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.auditmanager_v1.services.audit_manager.pagers.ListResourceEnrollmentStatusesAsyncPager |
Response message for ListResourceEnrollmentStatuses. Iterating over this object will yield results and resolve additional pages automatically. |
parse_audit_report_path
parse_audit_report_path(path: str) -> typing.Dict[str, str]Parses a audit_report path into its component segments.
parse_audit_scope_report_path
parse_audit_scope_report_path(path: str) -> typing.Dict[str, str]Parses a audit_scope_report 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_enrollment_path
parse_enrollment_path(path: str) -> typing.Dict[str, str]Parses a enrollment path into its component segments.
parse_enrollment_status_scope_path
parse_enrollment_status_scope_path(path: str) -> typing.Dict[str, str]Parses a enrollment_status_scope path into its component segments.
parse_resource_enrollment_status_path
parse_resource_enrollment_status_path(path: str) -> typing.Dict[str, str]Parses a resource_enrollment_status path into its component segments.
parse_standard_path
parse_standard_path(path: str) -> typing.Dict[str, str]Parses a standard path into its component segments.
resource_enrollment_status_path
resource_enrollment_status_path(
folder: str, location: str, resource_enrollment_status: str
) -> strReturns a fully-qualified resource_enrollment_status string.
standard_path
standard_path(project: str, location: str, standard: str) -> strReturns a fully-qualified standard string.