Reference documentation and code samples for the Google Cloud Audit Manager V1 Client class AuditManagerClient.
Service Description: Service describing handlers for resources
This class provides the ability to make remote calls to the backing service through method calls that map to API methods.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parseName method to extract the individual identifiers contained within formatted names that are returned by the API.
Namespace
Google \ Cloud \ AuditManager \ V1 \ ClientMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
options |
array|Google\ApiCore\Options\ClientOptions
Optional. Options for configuring the service API wrapper. |
↳ apiEndpoint |
string
The address of the API remote host. May optionally include the port, formatted as "
|
↳ credentials |
Google\Auth\FetchAuthTokenInterface|Google\ApiCore\CredentialsWrapper
This option should only be used with a pre-constructed Google\Auth\FetchAuthTokenInterface or Google\ApiCore\CredentialsWrapper object. Note that when one of these objects are provided, any settings in $credentialsConfig will be ignored. Important: If you are providing a path to a credentials file, or a decoded credentials file as a PHP array, this usage is now DEPRECATED. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data. It is recommended to create the credentials explicitly |
↳ credentialsConfig |
array
Options used to configure credentials, including auth token caching, for the client. For a full list of supporting configuration options, see Google\ApiCore\CredentialsWrapper::build() . |
↳ disableRetries |
bool
Determines whether or not retries defined by the client configuration should be disabled. Defaults to |
↳ clientConfig |
string|array
Client method configuration, including retry settings. This option can be either a path to a JSON file, or a PHP array containing the decoded JSON data. By default this settings points to the default client config file, which is provided in the resources folder. |
↳ transport |
string|Google\ApiCore\Transport\TransportInterface
The transport used for executing network requests. May be either the string |
↳ transportConfig |
array
Configuration options that will be used to construct the transport. Options for each supported transport type should be passed in a key for that transport. For example: $transportConfig = [ 'grpc' => [...], 'rest' => [...], ]; See the Google\ApiCore\Transport\GrpcTransport::build() and Google\ApiCore\Transport\RestTransport::build() methods for the supported options. |
↳ clientCertSource |
callable
A callable which returns the client cert as a string. This can be used to provide a certificate and private key to the transport layer for mTLS. |
↳ logger |
false|Psr\Log\LoggerInterface
A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the 'GOOGLE_SDK_PHP_LOGGING' environment flag |
↳ universeDomain |
string
The service domain for the client. Defaults to 'googleapis.com'. |
createAuditSchedule
Creates a new audit schedule in a given project and location.
The async variant is AuditManagerClient::createAuditScheduleAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\AuditManager\V1\CreateAuditScheduleRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\AuditManager\V1\AuditSchedule |
|
use Google\ApiCore\ApiException;
use Google\Cloud\AuditManager\V1\AuditSchedule;
use Google\Cloud\AuditManager\V1\AuditSchedule\AuditReportFormat;
use Google\Cloud\AuditManager\V1\Client\AuditManagerClient;
use Google\Cloud\AuditManager\V1\CreateAuditScheduleRequest;
use Google\Cloud\AuditManager\V1\ScheduleConfig;
use Google\Cloud\AuditManager\V1\ScheduleConfig\Frequency;
use Google\Protobuf\Timestamp;
/**
* @param string $formattedParent Project or folder that this audit schedule is for, in one of the
* following formats:
*
* * `projects/{project}/locations/{location}`
* * `folders/{folder}/locations/{location}`
* Please see {@see AuditManagerClient::folderLocationName()} for help formatting this field.
* @param string $auditScheduleGcsUri Cloud Storage bucket where Audit Manager can upload the audit
* report and evidence. The format is `gs://{bucket_name}`.
* @param string $auditScheduleComplianceFramework Framework (set of controls) that the audit scope report is
* generated against. For example, `NIST_800_53`.
* @param int $auditScheduleReportFormat Format for the audit report.
* @param int $auditScheduleScheduleConfigFrequency Frequency of audit runs.
* @param string $auditScheduleId ID to use for the audit schedule, which becomes the final
* component of the audit schedule's resource name.
*/
function create_audit_schedule_sample(
string $formattedParent,
string $auditScheduleGcsUri,
string $auditScheduleComplianceFramework,
int $auditScheduleReportFormat,
int $auditScheduleScheduleConfigFrequency,
string $auditScheduleId
): void {
// Create a client.
$auditManagerClient = new AuditManagerClient();
// Prepare the request message.
$auditScheduleScheduleConfigStartTime = new Timestamp();
$auditScheduleScheduleConfig = (new ScheduleConfig())
->setStartTime($auditScheduleScheduleConfigStartTime)
->setFrequency($auditScheduleScheduleConfigFrequency);
$auditSchedule = (new AuditSchedule())
->setGcsUri($auditScheduleGcsUri)
->setComplianceFramework($auditScheduleComplianceFramework)
->setReportFormat($auditScheduleReportFormat)
->setScheduleConfig($auditScheduleScheduleConfig);
$request = (new CreateAuditScheduleRequest())
->setParent($formattedParent)
->setAuditSchedule($auditSchedule)
->setAuditScheduleId($auditScheduleId);
// Call the API and handle any network failures.
try {
/** @var AuditSchedule $response */
$response = $auditManagerClient->createAuditSchedule($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = AuditManagerClient::folderLocationName('[FOLDER]', '[LOCATION]');
$auditScheduleGcsUri = '[GCS_URI]';
$auditScheduleComplianceFramework = '[COMPLIANCE_FRAMEWORK]';
$auditScheduleReportFormat = AuditReportFormat::AUDIT_REPORT_FORMAT_UNSPECIFIED;
$auditScheduleScheduleConfigFrequency = Frequency::FREQUENCY_UNSPECIFIED;
$auditScheduleId = '[AUDIT_SCHEDULE_ID]';
create_audit_schedule_sample(
$formattedParent,
$auditScheduleGcsUri,
$auditScheduleComplianceFramework,
$auditScheduleReportFormat,
$auditScheduleScheduleConfigFrequency,
$auditScheduleId
);
}
enrollResource
Adds 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.
The async variant is AuditManagerClient::enrollResourceAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\AuditManager\V1\EnrollResourceRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\AuditManager\V1\Enrollment |
|
use Google\ApiCore\ApiException;
use Google\Cloud\AuditManager\V1\Client\AuditManagerClient;
use Google\Cloud\AuditManager\V1\EnrollResourceRequest;
use Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination;
use Google\Cloud\AuditManager\V1\Enrollment;
/**
* @param string $scope Organization, folder, or project to enroll in Audit Manager, in
* one of the following formats:
*
* * `projects/{project}/locations/{location}`
* * `folders/{folder}/locations/{location}`
* * `organizations/{organization}/locations/{location}`
*/
function enroll_resource_sample(string $scope): void
{
// Create a client.
$auditManagerClient = new AuditManagerClient();
// Prepare the request message.
$destinations = [new EligibleDestination()];
$request = (new EnrollResourceRequest())
->setScope($scope)
->setDestinations($destinations);
// Call the API and handle any network failures.
try {
/** @var Enrollment $response */
$response = $auditManagerClient->enrollResource($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$scope = '[SCOPE]';
enroll_resource_sample($scope);
}
generateAuditReport
Registers audit report generation requests. This method returns the operation identifier that you can use to track the report generation progress.
The async variant is AuditManagerClient::generateAuditReportAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\AuditManager\V1\GenerateAuditReportRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\OperationResponse<Google\Cloud\AuditManager\V1\AuditReport> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\AuditManager\V1\AuditReport;
use Google\Cloud\AuditManager\V1\Client\AuditManagerClient;
use Google\Cloud\AuditManager\V1\GenerateAuditReportRequest;
use Google\Cloud\AuditManager\V1\GenerateAuditReportRequest\AuditReportFormat;
use Google\Rpc\Status;
/**
* @param string $scope Organization, folder, or project that the audit applies to, in
* one of the following formats:
*
* * `projects/{project}/locations/{location}`
* * `folders/{folder}/locations/{location}`
* * `organizations/{organization}/locations/{location}`
* @param int $reportFormat Format for the audit report.
* @param string $complianceFramework The framework that's used for the audit report. For example,
* `NIST_800_53`.
*/
function generate_audit_report_sample(
string $scope,
int $reportFormat,
string $complianceFramework
): void {
// Create a client.
$auditManagerClient = new AuditManagerClient();
// Prepare the request message.
$request = (new GenerateAuditReportRequest())
->setScope($scope)
->setReportFormat($reportFormat)
->setComplianceFramework($complianceFramework);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $auditManagerClient->generateAuditReport($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var AuditReport $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$scope = '[SCOPE]';
$reportFormat = AuditReportFormat::AUDIT_REPORT_FORMAT_UNSPECIFIED;
$complianceFramework = '[COMPLIANCE_FRAMEWORK]';
generate_audit_report_sample($scope, $reportFormat, $complianceFramework);
}
generateAuditScopeReport
Generates 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.
The async variant is AuditManagerClient::generateAuditScopeReportAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\AuditManager\V1\AuditScopeReport |
|
use Google\ApiCore\ApiException;
use Google\Cloud\AuditManager\V1\AuditScopeReport;
use Google\Cloud\AuditManager\V1\Client\AuditManagerClient;
use Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest;
use Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest\AuditScopeReportFormat;
/**
* @param string $scope Project or folder that the audit scope report is generated for,
* in one of the following formats:
*
* * `projects/{project}/locations/{location}`
* * `folders/{folder}/locations/{location}`
* * `organizations/{organization}/locations/{location}`
* @param int $reportFormat Format for the audit scope report.
* @param string $complianceFramework Framework (set of controls) that the audit scope report is
* generated against. For example, `NIST_800_53`.
*/
function generate_audit_scope_report_sample(
string $scope,
int $reportFormat,
string $complianceFramework
): void {
// Create a client.
$auditManagerClient = new AuditManagerClient();
// Prepare the request message.
$request = (new GenerateAuditScopeReportRequest())
->setScope($scope)
->setReportFormat($reportFormat)
->setComplianceFramework($complianceFramework);
// Call the API and handle any network failures.
try {
/** @var AuditScopeReport $response */
$response = $auditManagerClient->generateAuditScopeReport($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$scope = '[SCOPE]';
$reportFormat = AuditScopeReportFormat::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED;
$complianceFramework = '[COMPLIANCE_FRAMEWORK]';
generate_audit_scope_report_sample($scope, $reportFormat, $complianceFramework);
}
getAuditReport
Gets the full metadata and findings for an audit report.
The async variant is AuditManagerClient::getAuditReportAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\AuditManager\V1\GetAuditReportRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\AuditManager\V1\AuditReport |
|
use Google\ApiCore\ApiException;
use Google\Cloud\AuditManager\V1\AuditReport;
use Google\Cloud\AuditManager\V1\Client\AuditManagerClient;
use Google\Cloud\AuditManager\V1\GetAuditReportRequest;
/**
* @param string $formattedName Name of the audit report, in one of the following formats:
*
* * `projects/{project}/locations/{location}/auditReports/{audit_report}`
* * `folders/{folder}/locations/{location}/auditReports/{audit_report}`
* * `organizations/{organization}/locations/{location}/auditReports/{audit_report}`
* Please see {@see AuditManagerClient::auditReportName()} for help formatting this field.
*/
function get_audit_report_sample(string $formattedName): void
{
// Create a client.
$auditManagerClient = new AuditManagerClient();
// Prepare the request message.
$request = (new GetAuditReportRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var AuditReport $response */
$response = $auditManagerClient->getAuditReport($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = AuditManagerClient::auditReportName('[PROJECT]', '[LOCATION]', '[AUDIT_REPORT]');
get_audit_report_sample($formattedName);
}
getAuditSchedule
Gets details of a single audit schedule.
The async variant is AuditManagerClient::getAuditScheduleAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\AuditManager\V1\GetAuditScheduleRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\AuditManager\V1\AuditSchedule |
|
use Google\ApiCore\ApiException;
use Google\Cloud\AuditManager\V1\AuditSchedule;
use Google\Cloud\AuditManager\V1\Client\AuditManagerClient;
use Google\Cloud\AuditManager\V1\GetAuditScheduleRequest;
/**
* @param string $formattedName Name of the audit schedule to retrieve, in one of the following
* formats:
*
* * `projects/{project}/locations/{location}/auditSchedules/{audit_schedule}`
* * `folders/{folder}/locations/{location}/auditSchedules/{audit_schedule}`
* * `organizations/{organization}/locations/{location}/auditSchedules/{audit_schedule}`
* Please see {@see AuditManagerClient::auditScheduleName()} for help formatting this field.
*/
function get_audit_schedule_sample(string $formattedName): void
{
// Create a client.
$auditManagerClient = new AuditManagerClient();
// Prepare the request message.
$request = (new GetAuditScheduleRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var AuditSchedule $response */
$response = $auditManagerClient->getAuditSchedule($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = AuditManagerClient::auditScheduleName(
'[PROJECT]',
'[LOCATION]',
'[AUDIT_SCHEDULE]'
);
get_audit_schedule_sample($formattedName);
}
getResourceEnrollmentStatus
Gets a resource and its enrollment status.
The async variant is AuditManagerClient::getResourceEnrollmentStatusAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\AuditManager\V1\GetResourceEnrollmentStatusRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus |
|
use Google\ApiCore\ApiException;
use Google\Cloud\AuditManager\V1\Client\AuditManagerClient;
use Google\Cloud\AuditManager\V1\GetResourceEnrollmentStatusRequest;
use Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus;
/**
* @param string $formattedName Name of the resource enrollment status, in one of the following
* formats:
*
* * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}`
* * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}`
* * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}`
* Please see {@see AuditManagerClient::resourceEnrollmentStatusName()} for help formatting this field.
*/
function get_resource_enrollment_status_sample(string $formattedName): void
{
// Create a client.
$auditManagerClient = new AuditManagerClient();
// Prepare the request message.
$request = (new GetResourceEnrollmentStatusRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var ResourceEnrollmentStatus $response */
$response = $auditManagerClient->getResourceEnrollmentStatus($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = AuditManagerClient::resourceEnrollmentStatusName(
'[FOLDER]',
'[LOCATION]',
'[RESOURCE_ENROLLMENT_STATUS]'
);
get_resource_enrollment_status_sample($formattedName);
}
listAuditReports
Lists the audit reports for the organization, folder, or project that you specify as the parent scope.
The async variant is AuditManagerClient::listAuditReportsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\AuditManager\V1\ListAuditReportsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\AuditManager\V1\AuditReport;
use Google\Cloud\AuditManager\V1\Client\AuditManagerClient;
use Google\Cloud\AuditManager\V1\ListAuditReportsRequest;
/**
* @param string $formattedParent Parent organization, folder, or project to list reports for,
* in one of the following formats:
*
* * `projects/{project}/locations/{location}`
* * `folders/{folder}/locations/{location}`
* * `organizations/{organization}/locations/{location}`
* Please see {@see AuditManagerClient::folderLocationName()} for help formatting this field.
*/
function list_audit_reports_sample(string $formattedParent): void
{
// Create a client.
$auditManagerClient = new AuditManagerClient();
// Prepare the request message.
$request = (new ListAuditReportsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $auditManagerClient->listAuditReports($request);
/** @var AuditReport $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = AuditManagerClient::folderLocationName('[FOLDER]', '[LOCATION]');
list_audit_reports_sample($formattedParent);
}
listAuditSchedules
Lists audit schedules in a given project and location.
The async variant is AuditManagerClient::listAuditSchedulesAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\AuditManager\V1\ListAuditSchedulesRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\AuditManager\V1\AuditSchedule;
use Google\Cloud\AuditManager\V1\Client\AuditManagerClient;
use Google\Cloud\AuditManager\V1\ListAuditSchedulesRequest;
/**
* @param string $formattedParent Parent for the audit schedule, in one of the following formats:
*
* * `projects/{project}/locations/{location}`
* * `folders/{folder}/locations/{location}`
* * `organizations/{organization}/locations/{location}`
* Please see {@see AuditManagerClient::folderLocationName()} for help formatting this field.
*/
function list_audit_schedules_sample(string $formattedParent): void
{
// Create a client.
$auditManagerClient = new AuditManagerClient();
// Prepare the request message.
$request = (new ListAuditSchedulesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $auditManagerClient->listAuditSchedules($request);
/** @var AuditSchedule $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = AuditManagerClient::folderLocationName('[FOLDER]', '[LOCATION]');
list_audit_schedules_sample($formattedParent);
}
listControls
Lists the controls that you must implement to become compliant to a regulatory standard.
The async variant is AuditManagerClient::listControlsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\AuditManager\V1\ListControlsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\AuditManager\V1\Client\AuditManagerClient;
use Google\Cloud\AuditManager\V1\Control;
use Google\Cloud\AuditManager\V1\ListControlsRequest;
/**
* @param string $formattedParent Standard to list controls for, in one of the following formats:
*
* * `projects/{project}/locations/{location}/standards/{standard}`
* * `folders/{folder}/locations/{location}/standards/{standard}`
* * `organizations/{organization}/locations/{location}/standards/{standard}`
* Please see {@see AuditManagerClient::standardName()} for help formatting this field.
*/
function list_controls_sample(string $formattedParent): void
{
// Create a client.
$auditManagerClient = new AuditManagerClient();
// Prepare the request message.
$request = (new ListControlsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $auditManagerClient->listControls($request);
/** @var Control $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = AuditManagerClient::standardName('[PROJECT]', '[LOCATION]', '[STANDARD]');
list_controls_sample($formattedParent);
}
listResourceEnrollmentStatuses
Lists all the folders and projects in an organization or folder, along with their enrollments.
The async variant is AuditManagerClient::listResourceEnrollmentStatusesAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\AuditManager\V1\ListResourceEnrollmentStatusesRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\AuditManager\V1\Client\AuditManagerClient;
use Google\Cloud\AuditManager\V1\ListResourceEnrollmentStatusesRequest;
use Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus;
/**
* @param string $formattedParent Parent organization or folder to list enrollment statuses for,
* in one of the following formats:
*
* * `folders/{folder}/locations/{location}`
* * `organizations/{organization}/locations/{location}`
* Please see {@see AuditManagerClient::enrollmentStatusScopeName()} for help formatting this field.
*/
function list_resource_enrollment_statuses_sample(string $formattedParent): void
{
// Create a client.
$auditManagerClient = new AuditManagerClient();
// Prepare the request message.
$request = (new ListResourceEnrollmentStatusesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $auditManagerClient->listResourceEnrollmentStatuses($request);
/** @var ResourceEnrollmentStatus $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = AuditManagerClient::enrollmentStatusScopeName('[FOLDER]', '[LOCATION]');
list_resource_enrollment_statuses_sample($formattedParent);
}
updateAuditSchedule
Updates an existing audit schedule.
The async variant is AuditManagerClient::updateAuditScheduleAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\AuditManager\V1\UpdateAuditScheduleRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\AuditManager\V1\AuditSchedule |
|
use Google\ApiCore\ApiException;
use Google\Cloud\AuditManager\V1\AuditSchedule;
use Google\Cloud\AuditManager\V1\AuditSchedule\AuditReportFormat;
use Google\Cloud\AuditManager\V1\Client\AuditManagerClient;
use Google\Cloud\AuditManager\V1\ScheduleConfig;
use Google\Cloud\AuditManager\V1\ScheduleConfig\Frequency;
use Google\Cloud\AuditManager\V1\UpdateAuditScheduleRequest;
use Google\Protobuf\Timestamp;
/**
* @param string $auditScheduleGcsUri Cloud Storage bucket where Audit Manager can upload the audit
* report and evidence. The format is `gs://{bucket_name}`.
* @param string $auditScheduleComplianceFramework Framework (set of controls) that the audit scope report is
* generated against. For example, `NIST_800_53`.
* @param int $auditScheduleReportFormat Format for the audit report.
* @param int $auditScheduleScheduleConfigFrequency Frequency of audit runs.
*/
function update_audit_schedule_sample(
string $auditScheduleGcsUri,
string $auditScheduleComplianceFramework,
int $auditScheduleReportFormat,
int $auditScheduleScheduleConfigFrequency
): void {
// Create a client.
$auditManagerClient = new AuditManagerClient();
// Prepare the request message.
$auditScheduleScheduleConfigStartTime = new Timestamp();
$auditScheduleScheduleConfig = (new ScheduleConfig())
->setStartTime($auditScheduleScheduleConfigStartTime)
->setFrequency($auditScheduleScheduleConfigFrequency);
$auditSchedule = (new AuditSchedule())
->setGcsUri($auditScheduleGcsUri)
->setComplianceFramework($auditScheduleComplianceFramework)
->setReportFormat($auditScheduleReportFormat)
->setScheduleConfig($auditScheduleScheduleConfig);
$request = (new UpdateAuditScheduleRequest())
->setAuditSchedule($auditSchedule);
// Call the API and handle any network failures.
try {
/** @var AuditSchedule $response */
$response = $auditManagerClient->updateAuditSchedule($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$auditScheduleGcsUri = '[GCS_URI]';
$auditScheduleComplianceFramework = '[COMPLIANCE_FRAMEWORK]';
$auditScheduleReportFormat = AuditReportFormat::AUDIT_REPORT_FORMAT_UNSPECIFIED;
$auditScheduleScheduleConfigFrequency = Frequency::FREQUENCY_UNSPECIFIED;
update_audit_schedule_sample(
$auditScheduleGcsUri,
$auditScheduleComplianceFramework,
$auditScheduleReportFormat,
$auditScheduleScheduleConfigFrequency
);
}
getLocation
Gets information about a location.
The async variant is AuditManagerClient::getLocationAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Location\GetLocationRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Location\Location |
|
use Google\ApiCore\ApiException;
use Google\Cloud\AuditManager\V1\Client\AuditManagerClient;
use Google\Cloud\Location\GetLocationRequest;
use Google\Cloud\Location\Location;
/**
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function get_location_sample(): void
{
// Create a client.
$auditManagerClient = new AuditManagerClient();
// Prepare the request message.
$request = new GetLocationRequest();
// Call the API and handle any network failures.
try {
/** @var Location $response */
$response = $auditManagerClient->getLocation($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
listLocations
Lists information about the supported locations for this service.
This method lists locations based on the resource scope provided in
the ListLocationsRequest.name field: *
Global locations: If name is empty, the method lists the
public locations available to all projects. * Project-specific
locations: If name follows the format
projects/{project}, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.
For gRPC and client library implementations, the resource name is
passed as the name field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.
The async variant is AuditManagerClient::listLocationsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Location\ListLocationsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\AuditManager\V1\Client\AuditManagerClient;
use Google\Cloud\Location\ListLocationsRequest;
use Google\Cloud\Location\Location;
/**
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function list_locations_sample(): void
{
// Create a client.
$auditManagerClient = new AuditManagerClient();
// Prepare the request message.
$request = new ListLocationsRequest();
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $auditManagerClient->listLocations($request);
/** @var Location $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
createAuditScheduleAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\AuditManager\V1\CreateAuditScheduleRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\AuditManager\V1\AuditSchedule> |
|
enrollResourceAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\AuditManager\V1\EnrollResourceRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\AuditManager\V1\Enrollment> |
|
generateAuditReportAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\AuditManager\V1\GenerateAuditReportRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
generateAuditScopeReportAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\AuditManager\V1\AuditScopeReport> |
|
getAuditReportAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\AuditManager\V1\GetAuditReportRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\AuditManager\V1\AuditReport> |
|
getAuditScheduleAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\AuditManager\V1\GetAuditScheduleRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\AuditManager\V1\AuditSchedule> |
|
getResourceEnrollmentStatusAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\AuditManager\V1\GetResourceEnrollmentStatusRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus> |
|
listAuditReportsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\AuditManager\V1\ListAuditReportsRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
listAuditSchedulesAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\AuditManager\V1\ListAuditSchedulesRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
listControlsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\AuditManager\V1\ListControlsRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
listResourceEnrollmentStatusesAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\AuditManager\V1\ListResourceEnrollmentStatusesRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
updateAuditScheduleAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\AuditManager\V1\UpdateAuditScheduleRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\AuditManager\V1\AuditSchedule> |
|
getLocationAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Location\GetLocationRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Location\Location> |
|
listLocationsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Location\ListLocationsRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
getOperationsClient
Return an OperationsClient object with the same endpoint as $this.
| Returns | |
|---|---|
| Type | Description |
Google\LongRunning\Client\OperationsClient |
|
resumeOperation
Resume an existing long running operation that was previously started by a long running API method. If $methodName is not provided, or does not match a long running API method, then the operation can still be resumed, but the OperationResponse object will not deserialize the final response.
| Parameters | |
|---|---|
| Name | Description |
operationName |
string
The name of the long running operation |
methodName |
string
The name of the method used to start the operation |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\OperationResponse |
|
static::auditReportName
Formats a string containing the fully-qualified path to represent a audit_report resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
auditReport |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted audit_report resource. |
static::auditScheduleName
Formats a string containing the fully-qualified path to represent a audit_schedule resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
auditSchedule |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted audit_schedule resource. |
static::enrollmentStatusScopeName
Formats a string containing the fully-qualified path to represent a enrollment_status_scope resource.
| Parameters | |
|---|---|
| Name | Description |
folder |
string
|
location |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted enrollment_status_scope resource. |
static::folderLocationName
Formats a string containing the fully-qualified path to represent a folder_location resource.
| Parameters | |
|---|---|
| Name | Description |
folder |
string
|
location |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted folder_location resource. |
static::folderLocationAuditReportName
Formats a string containing the fully-qualified path to represent a folder_location_audit_report resource.
| Parameters | |
|---|---|
| Name | Description |
folder |
string
|
location |
string
|
auditReport |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted folder_location_audit_report resource. |
static::folderLocationAuditScheduleName
Formats a string containing the fully-qualified path to represent a folder_location_audit_schedule resource.
| Parameters | |
|---|---|
| Name | Description |
folder |
string
|
location |
string
|
auditSchedule |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted folder_location_audit_schedule resource. |
static::folderLocationResourceEnrollmentStatusName
Formats a string containing the fully-qualified path to represent a folder_location_resource_enrollment_status resource.
| Parameters | |
|---|---|
| Name | Description |
folder |
string
|
location |
string
|
resourceEnrollmentStatus |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted folder_location_resource_enrollment_status resource. |
static::folderLocationStandardName
Formats a string containing the fully-qualified path to represent a folder_location_standard resource.
| Parameters | |
|---|---|
| Name | Description |
folder |
string
|
location |
string
|
standard |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted folder_location_standard resource. |
static::locationName
Formats a string containing the fully-qualified path to represent a location resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted location resource. |
static::organizationLocationName
Formats a string containing the fully-qualified path to represent a organization_location resource.
| Parameters | |
|---|---|
| Name | Description |
organization |
string
|
location |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted organization_location resource. |
static::organizationLocationAuditReportName
Formats a string containing the fully-qualified path to represent a organization_location_audit_report resource.
| Parameters | |
|---|---|
| Name | Description |
organization |
string
|
location |
string
|
auditReport |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted organization_location_audit_report resource. |
static::organizationLocationAuditScheduleName
Formats a string containing the fully-qualified path to represent a organization_location_audit_schedule resource.
| Parameters | |
|---|---|
| Name | Description |
organization |
string
|
location |
string
|
auditSchedule |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted organization_location_audit_schedule resource. |
static::organizationLocationResourceEnrollmentStatusName
Formats a string containing the fully-qualified path to represent a organization_location_resource_enrollment_status resource.
| Parameters | |
|---|---|
| Name | Description |
organization |
string
|
location |
string
|
resourceEnrollmentStatus |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted organization_location_resource_enrollment_status resource. |
static::organizationLocationStandardName
Formats a string containing the fully-qualified path to represent a organization_location_standard resource.
| Parameters | |
|---|---|
| Name | Description |
organization |
string
|
location |
string
|
standard |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted organization_location_standard resource. |
static::projectLocationAuditReportName
Formats a string containing the fully-qualified path to represent a project_location_audit_report resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
auditReport |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted project_location_audit_report resource. |
static::projectLocationAuditScheduleName
Formats a string containing the fully-qualified path to represent a project_location_audit_schedule resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
auditSchedule |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted project_location_audit_schedule resource. |
static::projectLocationResourceEnrollmentStatusName
Formats a string containing the fully-qualified path to represent a project_location_resource_enrollment_status resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
resourceEnrollmentStatus |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted project_location_resource_enrollment_status resource. |
static::projectLocationStandardName
Formats a string containing the fully-qualified path to represent a project_location_standard resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
standard |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted project_location_standard resource. |
static::resourceEnrollmentStatusName
Formats a string containing the fully-qualified path to represent a resource_enrollment_status resource.
| Parameters | |
|---|---|
| Name | Description |
folder |
string
|
location |
string
|
resourceEnrollmentStatus |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted resource_enrollment_status resource. |
static::standardName
Formats a string containing the fully-qualified path to represent a standard resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
standard |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted standard resource. |
static::parseName
Parses a formatted name string and returns an associative array of the components in the name.
The following name formats are supported: Template: Pattern
- auditReport: projects/{project}/locations/{location}/auditReports/{audit_report}
- auditSchedule: projects/{project}/locations/{location}/auditSchedules/{audit_schedule}
- enrollmentStatusScope: folders/{folder}/locations/{location}
- folderLocation: folders/{folder}/locations/{location}
- folderLocationAuditReport: folders/{folder}/locations/{location}/auditReports/{audit_report}
- folderLocationAuditSchedule: folders/{folder}/locations/{location}/auditSchedules/{audit_schedule}
- folderLocationResourceEnrollmentStatus: folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}
- folderLocationStandard: folders/{folder}/locations/{location}/standards/{standard}
- location: projects/{project}/locations/{location}
- organizationLocation: organizations/{organization}/locations/{location}
- organizationLocationAuditReport: organizations/{organization}/locations/{location}/auditReports/{audit_report}
- organizationLocationAuditSchedule: organizations/{organization}/locations/{location}/auditSchedules/{audit_schedule}
- organizationLocationResourceEnrollmentStatus: organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}
- organizationLocationStandard: organizations/{organization}/locations/{location}/standards/{standard}
- projectLocationAuditReport: projects/{project}/locations/{location}/auditReports/{audit_report}
- projectLocationAuditSchedule: projects/{project}/locations/{location}/auditSchedules/{audit_schedule}
- projectLocationResourceEnrollmentStatus: projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}
- projectLocationStandard: projects/{project}/locations/{location}/standards/{standard}
- resourceEnrollmentStatus: folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}
- standard: projects/{project}/locations/{location}/standards/{standard}
The optional $template argument can be supplied to specify a particular pattern, and must match one of the templates listed above. If no $template argument is provided, or if the $template argument does not match one of the templates listed, then parseName will check each of the supported templates, and return the first match.
| Parameters | |
|---|---|
| Name | Description |
formattedName |
string
The formatted name string |
template |
?string
Optional name of template to match |
| Returns | |
|---|---|
| Type | Description |
array |
An associative array from name component IDs to component values. |