AuditManagerClient(
*,
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,
],
]
] = None,
client_options: typing.Optional[
typing.Union[google.api_core.client_options.ClientOptions, dict]
] = None,
client_info: google.api_core.gapic_v1.client_info.ClientInfo = google.api_core.gapic_v1.client_info.ClientInfo
)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
AuditManagerClient
AuditManagerClient(
*,
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,
],
]
] = None,
client_options: typing.Optional[
typing.Union[google.api_core.client_options.ClientOptions, dict]
] = None,
client_info: google.api_core.gapic_v1.client_info.ClientInfo = google.api_core.gapic_v1.client_info.ClientInfo
)Instantiates the audit manager 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. 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. |
__exit__
__exit__(type, value, traceback)Releases underlying transport's resources.
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[
google.longrunning.operations_pb2.CancelOperationRequest
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> 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.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
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[
google.longrunning.operations_pb2.DeleteOperationRequest
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> 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.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
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.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.auditmanager_v1.types.auditmanager.EnrollmentEnrolls the customer resource(folder/project/organization) to the audit manager service by creating the audit managers Service Agent in customers workload and granting required permissions to the Service Agent. Please note that if enrollment request is made on the already enrolled workload then enrollment is executed overriding 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
def sample_enroll_resource():
# Create a client
client = auditmanager_v1.AuditManagerClient()
# 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 = client.enroll_resource(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.auditmanager_v1.types.EnrollResourceRequest, dict]
The request object. Request message to subscribe the Audit Manager service for given resource. |
scope |
str
Required. The resource to be enrolled to the audit manager. Scope format should be resource_type/resource_identifier Eg: projects/{project}/locations/{location}, folders/{folder}/locations/{location} organizations/{organization}/locations/{location} This corresponds to the |
destinations |
MutableSequence[google.cloud.auditmanager_v1.types.EnrollResourceRequest.EligibleDestination]
Required. List of destination among which customer can choose to upload their reports during the audit process. While enrolling at a organization/folder level, customer can choose Cloud storage bucket in any project. If the audit is triggered at project level using the service agent at organization/folder level, all the destination options associated with respective organization/folder level service agent will be available to auditing projects. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.auditmanager_v1.types.Enrollment |
The enrollment resource. |
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 |
AuditManagerClient |
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 |
AuditManagerClient |
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 |
AuditManagerClient |
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.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.OperationRegister the Audit Report generation requests and returns the OperationId using which the customer can 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
def sample_generate_audit_report():
# Create a client
client = auditmanager_v1.AuditManagerClient()
# Initialize request argument(s)
request = auditmanager_v1.GenerateAuditReportRequest(
gcs_uri="gcs_uri_value",
scope="scope_value",
compliance_standard="compliance_standard_value",
report_format="AUDIT_REPORT_FORMAT_ODF",
compliance_framework="compliance_framework_value",
)
# Make the request
operation = client.generate_audit_report(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.auditmanager_v1.types.GenerateAuditReportRequest, dict]
The request object. Message for requesting the Audit Report. |
scope |
str
Required. Scope for which the AuditScopeReport is required. Must be of format resource_type/resource_identifier Eg: projects/{project}/locations/{location}, folders/{folder}/locations/{location} This corresponds to the |
gcs_uri |
str
Destination Cloud storage bucket where report and evidence must be uploaded. The Cloud storage bucket provided here must be selected among the buckets entered during the enrollment process. This corresponds to the |
compliance_standard |
str
Required. Compliance Standard against which the Scope Report must be generated. Eg: FEDRAMP_MODERATE This corresponds to the |
report_format |
google.cloud.auditmanager_v1.types.GenerateAuditReportRequest.AuditReportFormat
Required. The format in which the audit report should be created. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation.Operation |
An object representing a long-running operation. The result type for the operation will be 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.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.auditmanager_v1.types.auditmanager.AuditScopeReportGenerates a demo report highlighting different responsibilities (Google/Customer/ shared) required to be fulfilled for the customer's workload to be compliant with the given 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
def sample_generate_audit_scope_report():
# Create a client
client = auditmanager_v1.AuditManagerClient()
# Initialize request argument(s)
request = auditmanager_v1.GenerateAuditScopeReportRequest(
scope="scope_value",
compliance_standard="compliance_standard_value",
report_format="AUDIT_SCOPE_REPORT_FORMAT_ODF",
compliance_framework="compliance_framework_value",
)
# Make the request
response = client.generate_audit_scope_report(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.auditmanager_v1.types.GenerateAuditScopeReportRequest, dict]
The request object. Message for requesting audit scope report. |
scope |
str
Required. Scope for which the AuditScopeReport is required. Must be of format resource_type/resource_identifier Eg: projects/{project}/locations/{location}, folders/{folder}/locations/{location} This corresponds to the |
compliance_standard |
str
Required. Compliance Standard against which the Scope Report must be generated. Eg: FEDRAMP_MODERATE This corresponds to the |
report_format |
google.cloud.auditmanager_v1.types.GenerateAuditScopeReportRequest.AuditScopeReportFormat
Required. The format in which the Scope report bytes should be returned. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.auditmanager_v1.types.AuditScopeReport |
The 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.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.auditmanager_v1.types.auditmanager.AuditReportGet the overall 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
def sample_get_audit_report():
# Create a client
client = auditmanager_v1.AuditManagerClient()
# Initialize request argument(s)
request = auditmanager_v1.GetAuditReportRequest(
name="name_value",
)
# Make the request
response = client.get_audit_report(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.auditmanager_v1.types.GetAuditReportRequest, dict]
The request object. Message for requesting the overall audit report for an audit report name. |
name |
str
Required. Format projects/{project}/locations/{location}/auditReports/{audit_report}, folders/{folder}/locations/{location}/auditReports/{audit_report} This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.auditmanager_v1.types.AuditReport |
An audit report. |
get_location
get_location(
request: typing.Optional[
google.cloud.location.locations_pb2.GetLocationRequest
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.location.locations_pb2.LocationGets information about a location.
| Parameters | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
|
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,
)Deprecated. Return the API endpoint and client cert source for mutual TLS.
The client cert source is determined in the following order:
(1) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is not "true", the
client cert source is None.
(2) if client_options.client_cert_source is provided, use the provided one; if the
default client cert source exists, use the default one; otherwise the client cert
source is None.
The API endpoint is determined in the following order:
(1) if client_options.api_endpoint if provided, use the provided one.
(2) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is "always", use the
default mTLS endpoint; if the environment variable is "never", use the default API
endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise
use the default API endpoint.
More details can be found at https://google.aip.dev/auth/4114.
| Parameter | |
|---|---|
| Name | Description |
client_options |
google.api_core.client_options.ClientOptions
Custom options for the client. Only the |
| Exceptions | |
|---|---|
| Type | Description |
google.auth.exceptions.MutualTLSChannelError |
If any errors happen. |
| Returns | |
|---|---|
| Type | Description |
Tuple[str, Callable[[], Tuple[bytes, bytes]]] |
returns the API endpoint and the client cert source to use. |
get_operation
get_operation(
request: typing.Optional[
google.longrunning.operations_pb2.GetOperationRequest
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.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.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
|
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.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.auditmanager_v1.types.auditmanager.ResourceEnrollmentStatusGet a resource along with 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
def sample_get_resource_enrollment_status():
# Create a client
client = auditmanager_v1.AuditManagerClient()
# Initialize request argument(s)
request = auditmanager_v1.GetResourceEnrollmentStatusRequest(
name="name_value",
)
# Make the request
response = client.get_resource_enrollment_status(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.auditmanager_v1.types.GetResourceEnrollmentStatusRequest, dict]
The request object. Message for getting the enrollment status of a resource. |
name |
str
Required. Format folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.auditmanager_v1.types.ResourceEnrollmentStatus |
A resource with its enrollment status. |
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.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.auditmanager_v1.services.audit_manager.pagers.ListAuditReportsPagerLists audit reports in the selected 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
def sample_list_audit_reports():
# Create a client
client = auditmanager_v1.AuditManagerClient()
# 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
for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.auditmanager_v1.types.ListAuditReportsRequest, dict]
The request object. Message for requesting to list the audit reports. |
parent |
str
Required. The parent scope for which to list the reports. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.auditmanager_v1.services.audit_manager.pagers.ListAuditReportsPager |
Response message with all the audit reports. 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.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.auditmanager_v1.services.audit_manager.pagers.ListControlsPagerGets controls needed to be implemented to be compliant to a 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
def sample_list_controls():
# Create a client
client = auditmanager_v1.AuditManagerClient()
# Initialize request argument(s)
request = auditmanager_v1.ListControlsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_controls(request=request)
# Handle the response
for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.auditmanager_v1.types.ListControlsRequest, dict]
The request object. Message for requesting all the controls for a compliance standard. |
parent |
str
Required. Format projects/{project}/locations/{location}/standards/{standard}, folders/{folder}/locations/{location}/standards/{standard} This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.auditmanager_v1.services.audit_manager.pagers.ListControlsPager |
Response message with all the controls for a compliance standard. Iterating over this object will yield results and resolve additional pages automatically. |
list_locations
list_locations(
request: typing.Optional[
google.cloud.location.locations_pb2.ListLocationsRequest
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.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.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
|
Response message for ListLocations method. |
list_operations
list_operations(
request: typing.Optional[
google.longrunning.operations_pb2.ListOperationsRequest
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.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.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
|
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.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.auditmanager_v1.services.audit_manager.pagers.ListResourceEnrollmentStatusesPager
)Fetches all resources under the parent along with their enrollment.
# 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
def sample_list_resource_enrollment_statuses():
# Create a client
client = auditmanager_v1.AuditManagerClient()
# 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
for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.auditmanager_v1.types.ListResourceEnrollmentStatusesRequest, dict]
The request object. Message for listing all the descendent resources under parent with enrollment. |
parent |
str
Required. The parent scope for which the list of resources with enrollments are required. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.auditmanager_v1.services.audit_manager.pagers.ListResourceEnrollmentStatusesPager |
Response message with all the descendent resources with enrollment. 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.