Audit Manager v1 API - Class AuditManagerClient (1.2.0)

public abstract class AuditManagerClient

Reference documentation and code samples for the Audit Manager v1 API class AuditManagerClient.

AuditManager client wrapper, for convenient use.

Inheritance

object > AuditManagerClient

Derived Types

Namespace

Google.Cloud.AuditManager.V1

Assembly

Google.Cloud.AuditManager.V1.dll

Remarks

Service describing handlers for resources

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the AuditManager service, which is a host of "auditmanager.googleapis.com" and a port of 443.

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default AuditManager scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

GenerateAuditReportOperationsClient

public virtual OperationsClient GenerateAuditReportOperationsClient { get; }

The long-running operations client for GenerateAuditReport.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual AuditManager.AuditManagerClient GrpcClient { get; }

The underlying gRPC AuditManager client

Property Value
Type Description
AuditManagerAuditManagerClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

Create()

public static AuditManagerClient Create()

Synchronously creates a AuditManagerClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AuditManagerClientBuilder.

Returns
Type Description
AuditManagerClient

The created AuditManagerClient.

CreateAsync(CancellationToken)

public static Task<AuditManagerClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a AuditManagerClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AuditManagerClientBuilder.

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskAuditManagerClient

The task representing the created AuditManagerClient.

EnrollResource(EnrollResourceRequest, CallSettings)

public virtual Enrollment EnrollResource(EnrollResourceRequest request, CallSettings callSettings = null)

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.

Parameters
Name Description
request EnrollResourceRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Enrollment

The RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = AuditManagerClient.Create();
// Initialize request argument(s)
EnrollResourceRequest request = new EnrollResourceRequest
{
    Scope = "",
    Destinations =
    {
        new EnrollResourceRequest.Types.EligibleDestination(),
    },
};
// Make the request
Enrollment response = auditManagerClient.EnrollResource(request);

EnrollResource(string, IEnumerable<EligibleDestination>, CallSettings)

public virtual Enrollment EnrollResource(string scope, IEnumerable<EnrollResourceRequest.Types.EligibleDestination> destinations, CallSettings callSettings = null)

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.

Parameters
Name Description
scope string

Required. 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}
destinations IEnumerableEnrollResourceRequestTypesEligibleDestination

Required. Cloud Storage buckets that you can upload your audit reports to during the audit process.

When you enroll an organization or folder, you can choose a Cloud Storage bucket from any project in the organization or folder. If you run an audit at the project level using the service agent at the organization or folder level, all the buckets that are associated with the service agent are available.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Enrollment

The RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = AuditManagerClient.Create();
// Initialize request argument(s)
string scope = "";
IEnumerable<EnrollResourceRequest.Types.EligibleDestination> destinations = new EnrollResourceRequest.Types.EligibleDestination[]
{
    new EnrollResourceRequest.Types.EligibleDestination(),
};
// Make the request
Enrollment response = auditManagerClient.EnrollResource(scope, destinations);

EnrollResourceAsync(EnrollResourceRequest, CallSettings)

public virtual Task<Enrollment> EnrollResourceAsync(EnrollResourceRequest request, CallSettings callSettings = null)

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.

Parameters
Name Description
request EnrollResourceRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskEnrollment

A Task containing the RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
EnrollResourceRequest request = new EnrollResourceRequest
{
    Scope = "",
    Destinations =
    {
        new EnrollResourceRequest.Types.EligibleDestination(),
    },
};
// Make the request
Enrollment response = await auditManagerClient.EnrollResourceAsync(request);

EnrollResourceAsync(EnrollResourceRequest, CancellationToken)

public virtual Task<Enrollment> EnrollResourceAsync(EnrollResourceRequest request, CancellationToken cancellationToken)

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.

Parameters
Name Description
request EnrollResourceRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskEnrollment

A Task containing the RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
EnrollResourceRequest request = new EnrollResourceRequest
{
    Scope = "",
    Destinations =
    {
        new EnrollResourceRequest.Types.EligibleDestination(),
    },
};
// Make the request
Enrollment response = await auditManagerClient.EnrollResourceAsync(request);

EnrollResourceAsync(string, IEnumerable<EligibleDestination>, CallSettings)

public virtual Task<Enrollment> EnrollResourceAsync(string scope, IEnumerable<EnrollResourceRequest.Types.EligibleDestination> destinations, CallSettings callSettings = null)

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.

Parameters
Name Description
scope string

Required. 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}
destinations IEnumerableEnrollResourceRequestTypesEligibleDestination

Required. Cloud Storage buckets that you can upload your audit reports to during the audit process.

When you enroll an organization or folder, you can choose a Cloud Storage bucket from any project in the organization or folder. If you run an audit at the project level using the service agent at the organization or folder level, all the buckets that are associated with the service agent are available.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskEnrollment

A Task containing the RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
string scope = "";
IEnumerable<EnrollResourceRequest.Types.EligibleDestination> destinations = new EnrollResourceRequest.Types.EligibleDestination[]
{
    new EnrollResourceRequest.Types.EligibleDestination(),
};
// Make the request
Enrollment response = await auditManagerClient.EnrollResourceAsync(scope, destinations);

EnrollResourceAsync(string, IEnumerable<EligibleDestination>, CancellationToken)

public virtual Task<Enrollment> EnrollResourceAsync(string scope, IEnumerable<EnrollResourceRequest.Types.EligibleDestination> destinations, CancellationToken cancellationToken)

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.

Parameters
Name Description
scope string

Required. 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}
destinations IEnumerableEnrollResourceRequestTypesEligibleDestination

Required. Cloud Storage buckets that you can upload your audit reports to during the audit process.

When you enroll an organization or folder, you can choose a Cloud Storage bucket from any project in the organization or folder. If you run an audit at the project level using the service agent at the organization or folder level, all the buckets that are associated with the service agent are available.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskEnrollment

A Task containing the RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
string scope = "";
IEnumerable<EnrollResourceRequest.Types.EligibleDestination> destinations = new EnrollResourceRequest.Types.EligibleDestination[]
{
    new EnrollResourceRequest.Types.EligibleDestination(),
};
// Make the request
Enrollment response = await auditManagerClient.EnrollResourceAsync(scope, destinations);

GenerateAuditReport(GenerateAuditReportRequest, CallSettings)

public virtual Operation<AuditReport, OperationMetadata> GenerateAuditReport(GenerateAuditReportRequest request, CallSettings callSettings = null)

Registers audit report generation requests. This method returns the operation identifier that you can use to track the report generation progress.

Parameters
Name Description
request GenerateAuditReportRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationAuditReportOperationMetadata

The RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = AuditManagerClient.Create();
// Initialize request argument(s)
GenerateAuditReportRequest request = new GenerateAuditReportRequest
{
    Scope = "",
    GcsUri = "",
    ReportFormat = GenerateAuditReportRequest.Types.AuditReportFormat.Unspecified,
    ComplianceFramework = "",
    ValidateOnly = false,
};
// Make the request
Operation<AuditReport, OperationMetadata> response = auditManagerClient.GenerateAuditReport(request);

// Poll until the returned long-running operation is complete
Operation<AuditReport, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AuditReport result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AuditReport, OperationMetadata> retrievedResponse = auditManagerClient.PollOnceGenerateAuditReport(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AuditReport retrievedResult = retrievedResponse.Result;
}

GenerateAuditReport(string, string, string, AuditReportFormat, CallSettings)

[Obsolete]
public virtual Operation<AuditReport, OperationMetadata> GenerateAuditReport(string scope, string gcsUri, string complianceStandard, GenerateAuditReportRequest.Types.AuditReportFormat reportFormat, CallSettings callSettings = null)

Registers audit report generation requests. This method returns the operation identifier that you can use to track the report generation progress.

Parameters
Name Description
scope string

Required. 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}
gcsUri string

URL for the Cloud Storage bucket where the report and evidence is uploaded. You must select a bucket that was provided during the enrollment process.

complianceStandard string

Optional. Deprecated. Compliance standard for the audit report.

Use the compliance_framework field instead.

reportFormat GenerateAuditReportRequestTypesAuditReportFormat

Required. Format for the audit report.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationAuditReportOperationMetadata

The RPC response.

Example
            // Create client
            AuditManagerClient auditManagerClient = AuditManagerClient.Create();
            // Initialize request argument(s)
            string scope = "";
            string gcsUri = "";
            string complianceStandard = "";
            GenerateAuditReportRequest.Types.AuditReportFormat reportFormat = GenerateAuditReportRequest.Types.AuditReportFormat.Unspecified;
            // Make the request
#pragma warning disable CS0612
            Operation<AuditReport, OperationMetadata> response = auditManagerClient.GenerateAuditReport(scope, gcsUri, complianceStandard, reportFormat);
#pragma warning restore CS0612

            // Poll until the returned long-running operation is complete
            Operation<AuditReport, OperationMetadata> completedResponse = response.PollUntilCompleted();
            // Retrieve the operation result
            AuditReport result = completedResponse.Result;

            // Or get the name of the operation
            string operationName = response.Name;
            // This name can be stored, then the long-running operation retrieved later by name
            Operation<AuditReport, OperationMetadata> retrievedResponse = auditManagerClient.PollOnceGenerateAuditReport(operationName);
            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                AuditReport retrievedResult = retrievedResponse.Result;
            }

GenerateAuditReportAsync(GenerateAuditReportRequest, CallSettings)

public virtual Task<Operation<AuditReport, OperationMetadata>> GenerateAuditReportAsync(GenerateAuditReportRequest request, CallSettings callSettings = null)

Registers audit report generation requests. This method returns the operation identifier that you can use to track the report generation progress.

Parameters
Name Description
request GenerateAuditReportRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationAuditReportOperationMetadata

A Task containing the RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
GenerateAuditReportRequest request = new GenerateAuditReportRequest
{
    Scope = "",
    GcsUri = "",
    ReportFormat = GenerateAuditReportRequest.Types.AuditReportFormat.Unspecified,
    ComplianceFramework = "",
    ValidateOnly = false,
};
// Make the request
Operation<AuditReport, OperationMetadata> response = await auditManagerClient.GenerateAuditReportAsync(request);

// Poll until the returned long-running operation is complete
Operation<AuditReport, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AuditReport result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AuditReport, OperationMetadata> retrievedResponse = await auditManagerClient.PollOnceGenerateAuditReportAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AuditReport retrievedResult = retrievedResponse.Result;
}

GenerateAuditReportAsync(GenerateAuditReportRequest, CancellationToken)

public virtual Task<Operation<AuditReport, OperationMetadata>> GenerateAuditReportAsync(GenerateAuditReportRequest request, CancellationToken cancellationToken)

Registers audit report generation requests. This method returns the operation identifier that you can use to track the report generation progress.

Parameters
Name Description
request GenerateAuditReportRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationAuditReportOperationMetadata

A Task containing the RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
GenerateAuditReportRequest request = new GenerateAuditReportRequest
{
    Scope = "",
    GcsUri = "",
    ReportFormat = GenerateAuditReportRequest.Types.AuditReportFormat.Unspecified,
    ComplianceFramework = "",
    ValidateOnly = false,
};
// Make the request
Operation<AuditReport, OperationMetadata> response = await auditManagerClient.GenerateAuditReportAsync(request);

// Poll until the returned long-running operation is complete
Operation<AuditReport, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AuditReport result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AuditReport, OperationMetadata> retrievedResponse = await auditManagerClient.PollOnceGenerateAuditReportAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AuditReport retrievedResult = retrievedResponse.Result;
}

GenerateAuditReportAsync(string, string, string, AuditReportFormat, CallSettings)

[Obsolete]
public virtual Task<Operation<AuditReport, OperationMetadata>> GenerateAuditReportAsync(string scope, string gcsUri, string complianceStandard, GenerateAuditReportRequest.Types.AuditReportFormat reportFormat, CallSettings callSettings = null)

Registers audit report generation requests. This method returns the operation identifier that you can use to track the report generation progress.

Parameters
Name Description
scope string

Required. 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}
gcsUri string

URL for the Cloud Storage bucket where the report and evidence is uploaded. You must select a bucket that was provided during the enrollment process.

complianceStandard string

Optional. Deprecated. Compliance standard for the audit report.

Use the compliance_framework field instead.

reportFormat GenerateAuditReportRequestTypesAuditReportFormat

Required. Format for the audit report.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationAuditReportOperationMetadata

A Task containing the RPC response.

Example
            // Create client
            AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
            // Initialize request argument(s)
            string scope = "";
            string gcsUri = "";
            string complianceStandard = "";
            GenerateAuditReportRequest.Types.AuditReportFormat reportFormat = GenerateAuditReportRequest.Types.AuditReportFormat.Unspecified;
            // Make the request
#pragma warning disable CS0612
            Operation<AuditReport, OperationMetadata> response = await auditManagerClient.GenerateAuditReportAsync(scope, gcsUri, complianceStandard, reportFormat);
#pragma warning restore CS0612

            // Poll until the returned long-running operation is complete
            Operation<AuditReport, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
            // Retrieve the operation result
            AuditReport result = completedResponse.Result;

            // Or get the name of the operation
            string operationName = response.Name;
            // This name can be stored, then the long-running operation retrieved later by name
            Operation<AuditReport, OperationMetadata> retrievedResponse = await auditManagerClient.PollOnceGenerateAuditReportAsync(operationName);
            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                AuditReport retrievedResult = retrievedResponse.Result;
            }

GenerateAuditReportAsync(string, string, string, AuditReportFormat, CancellationToken)

[Obsolete]
public virtual Task<Operation<AuditReport, OperationMetadata>> GenerateAuditReportAsync(string scope, string gcsUri, string complianceStandard, GenerateAuditReportRequest.Types.AuditReportFormat reportFormat, CancellationToken cancellationToken)

Registers audit report generation requests. This method returns the operation identifier that you can use to track the report generation progress.

Parameters
Name Description
scope string

Required. 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}
gcsUri string

URL for the Cloud Storage bucket where the report and evidence is uploaded. You must select a bucket that was provided during the enrollment process.

complianceStandard string

Optional. Deprecated. Compliance standard for the audit report.

Use the compliance_framework field instead.

reportFormat GenerateAuditReportRequestTypesAuditReportFormat

Required. Format for the audit report.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationAuditReportOperationMetadata

A Task containing the RPC response.

Example
            // Create client
            AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
            // Initialize request argument(s)
            string scope = "";
            string gcsUri = "";
            string complianceStandard = "";
            GenerateAuditReportRequest.Types.AuditReportFormat reportFormat = GenerateAuditReportRequest.Types.AuditReportFormat.Unspecified;
            // Make the request
#pragma warning disable CS0612
            Operation<AuditReport, OperationMetadata> response = await auditManagerClient.GenerateAuditReportAsync(scope, gcsUri, complianceStandard, reportFormat);
#pragma warning restore CS0612

            // Poll until the returned long-running operation is complete
            Operation<AuditReport, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
            // Retrieve the operation result
            AuditReport result = completedResponse.Result;

            // Or get the name of the operation
            string operationName = response.Name;
            // This name can be stored, then the long-running operation retrieved later by name
            Operation<AuditReport, OperationMetadata> retrievedResponse = await auditManagerClient.PollOnceGenerateAuditReportAsync(operationName);
            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                AuditReport retrievedResult = retrievedResponse.Result;
            }

GenerateAuditScopeReport(GenerateAuditScopeReportRequest, CallSettings)

public virtual AuditScopeReport GenerateAuditScopeReport(GenerateAuditScopeReportRequest request, CallSettings callSettings = null)

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.
Parameters
Name Description
request GenerateAuditScopeReportRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AuditScopeReport

The RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = AuditManagerClient.Create();
// Initialize request argument(s)
GenerateAuditScopeReportRequest request = new GenerateAuditScopeReportRequest
{
    Scope = "",
    ReportFormat = GenerateAuditScopeReportRequest.Types.AuditScopeReportFormat.Unspecified,
    ComplianceFramework = "",
};
// Make the request
AuditScopeReport response = auditManagerClient.GenerateAuditScopeReport(request);

GenerateAuditScopeReport(string, string, AuditScopeReportFormat, CallSettings)

[Obsolete]
public virtual AuditScopeReport GenerateAuditScopeReport(string scope, string complianceStandard, GenerateAuditScopeReportRequest.Types.AuditScopeReportFormat reportFormat, CallSettings callSettings = null)

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.
Parameters
Name Description
scope string

Required. 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}
complianceStandard string

Optional. Deprecated. The standard (industry or regulatory requirements) that the audit scope report is run against.

Use the compliance_framework field instead.

reportFormat GenerateAuditScopeReportRequestTypesAuditScopeReportFormat

Required. Format for the audit scope report.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AuditScopeReport

The RPC response.

Example
            // Create client
            AuditManagerClient auditManagerClient = AuditManagerClient.Create();
            // Initialize request argument(s)
            string scope = "";
            string complianceStandard = "";
            GenerateAuditScopeReportRequest.Types.AuditScopeReportFormat reportFormat = GenerateAuditScopeReportRequest.Types.AuditScopeReportFormat.Unspecified;
            // Make the request
#pragma warning disable CS0612
            AuditScopeReport response = auditManagerClient.GenerateAuditScopeReport(scope, complianceStandard, reportFormat);
#pragma warning restore CS0612

GenerateAuditScopeReportAsync(GenerateAuditScopeReportRequest, CallSettings)

public virtual Task<AuditScopeReport> GenerateAuditScopeReportAsync(GenerateAuditScopeReportRequest request, CallSettings callSettings = null)

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.
Parameters
Name Description
request GenerateAuditScopeReportRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAuditScopeReport

A Task containing the RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
GenerateAuditScopeReportRequest request = new GenerateAuditScopeReportRequest
{
    Scope = "",
    ReportFormat = GenerateAuditScopeReportRequest.Types.AuditScopeReportFormat.Unspecified,
    ComplianceFramework = "",
};
// Make the request
AuditScopeReport response = await auditManagerClient.GenerateAuditScopeReportAsync(request);

GenerateAuditScopeReportAsync(GenerateAuditScopeReportRequest, CancellationToken)

public virtual Task<AuditScopeReport> GenerateAuditScopeReportAsync(GenerateAuditScopeReportRequest request, CancellationToken cancellationToken)

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.
Parameters
Name Description
request GenerateAuditScopeReportRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAuditScopeReport

A Task containing the RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
GenerateAuditScopeReportRequest request = new GenerateAuditScopeReportRequest
{
    Scope = "",
    ReportFormat = GenerateAuditScopeReportRequest.Types.AuditScopeReportFormat.Unspecified,
    ComplianceFramework = "",
};
// Make the request
AuditScopeReport response = await auditManagerClient.GenerateAuditScopeReportAsync(request);

GenerateAuditScopeReportAsync(string, string, AuditScopeReportFormat, CallSettings)

[Obsolete]
public virtual Task<AuditScopeReport> GenerateAuditScopeReportAsync(string scope, string complianceStandard, GenerateAuditScopeReportRequest.Types.AuditScopeReportFormat reportFormat, CallSettings callSettings = null)

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.
Parameters
Name Description
scope string

Required. 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}
complianceStandard string

Optional. Deprecated. The standard (industry or regulatory requirements) that the audit scope report is run against.

Use the compliance_framework field instead.

reportFormat GenerateAuditScopeReportRequestTypesAuditScopeReportFormat

Required. Format for the audit scope report.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAuditScopeReport

A Task containing the RPC response.

Example
            // Create client
            AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
            // Initialize request argument(s)
            string scope = "";
            string complianceStandard = "";
            GenerateAuditScopeReportRequest.Types.AuditScopeReportFormat reportFormat = GenerateAuditScopeReportRequest.Types.AuditScopeReportFormat.Unspecified;
            // Make the request
#pragma warning disable CS0612
            AuditScopeReport response = await auditManagerClient.GenerateAuditScopeReportAsync(scope, complianceStandard, reportFormat);
#pragma warning restore CS0612

GenerateAuditScopeReportAsync(string, string, AuditScopeReportFormat, CancellationToken)

[Obsolete]
public virtual Task<AuditScopeReport> GenerateAuditScopeReportAsync(string scope, string complianceStandard, GenerateAuditScopeReportRequest.Types.AuditScopeReportFormat reportFormat, CancellationToken cancellationToken)

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.
Parameters
Name Description
scope string

Required. 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}
complianceStandard string

Optional. Deprecated. The standard (industry or regulatory requirements) that the audit scope report is run against.

Use the compliance_framework field instead.

reportFormat GenerateAuditScopeReportRequestTypesAuditScopeReportFormat

Required. Format for the audit scope report.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAuditScopeReport

A Task containing the RPC response.

Example
            // Create client
            AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
            // Initialize request argument(s)
            string scope = "";
            string complianceStandard = "";
            GenerateAuditScopeReportRequest.Types.AuditScopeReportFormat reportFormat = GenerateAuditScopeReportRequest.Types.AuditScopeReportFormat.Unspecified;
            // Make the request
#pragma warning disable CS0612
            AuditScopeReport response = await auditManagerClient.GenerateAuditScopeReportAsync(scope, complianceStandard, reportFormat);
#pragma warning restore CS0612

GetAuditReport(AuditReportName, CallSettings)

public virtual AuditReport GetAuditReport(AuditReportName name, CallSettings callSettings = null)

Gets the full metadata and findings for an audit report.

Parameters
Name Description
name AuditReportName

Required. 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}
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AuditReport

The RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = AuditManagerClient.Create();
// Initialize request argument(s)
AuditReportName name = AuditReportName.FromProjectLocationAuditReport("[PROJECT]", "[LOCATION]", "[AUDIT_REPORT]");
// Make the request
AuditReport response = auditManagerClient.GetAuditReport(name);

GetAuditReport(GetAuditReportRequest, CallSettings)

public virtual AuditReport GetAuditReport(GetAuditReportRequest request, CallSettings callSettings = null)

Gets the full metadata and findings for an audit report.

Parameters
Name Description
request GetAuditReportRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AuditReport

The RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = AuditManagerClient.Create();
// Initialize request argument(s)
GetAuditReportRequest request = new GetAuditReportRequest
{
    AuditReportName = AuditReportName.FromProjectLocationAuditReport("[PROJECT]", "[LOCATION]", "[AUDIT_REPORT]"),
};
// Make the request
AuditReport response = auditManagerClient.GetAuditReport(request);

GetAuditReport(string, CallSettings)

public virtual AuditReport GetAuditReport(string name, CallSettings callSettings = null)

Gets the full metadata and findings for an audit report.

Parameters
Name Description
name string

Required. 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}
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AuditReport

The RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = AuditManagerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/auditReports/[AUDIT_REPORT]";
// Make the request
AuditReport response = auditManagerClient.GetAuditReport(name);

GetAuditReportAsync(AuditReportName, CallSettings)

public virtual Task<AuditReport> GetAuditReportAsync(AuditReportName name, CallSettings callSettings = null)

Gets the full metadata and findings for an audit report.

Parameters
Name Description
name AuditReportName

Required. 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}
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAuditReport

A Task containing the RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
AuditReportName name = AuditReportName.FromProjectLocationAuditReport("[PROJECT]", "[LOCATION]", "[AUDIT_REPORT]");
// Make the request
AuditReport response = await auditManagerClient.GetAuditReportAsync(name);

GetAuditReportAsync(AuditReportName, CancellationToken)

public virtual Task<AuditReport> GetAuditReportAsync(AuditReportName name, CancellationToken cancellationToken)

Gets the full metadata and findings for an audit report.

Parameters
Name Description
name AuditReportName

Required. 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}
cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAuditReport

A Task containing the RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
AuditReportName name = AuditReportName.FromProjectLocationAuditReport("[PROJECT]", "[LOCATION]", "[AUDIT_REPORT]");
// Make the request
AuditReport response = await auditManagerClient.GetAuditReportAsync(name);

GetAuditReportAsync(GetAuditReportRequest, CallSettings)

public virtual Task<AuditReport> GetAuditReportAsync(GetAuditReportRequest request, CallSettings callSettings = null)

Gets the full metadata and findings for an audit report.

Parameters
Name Description
request GetAuditReportRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAuditReport

A Task containing the RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
GetAuditReportRequest request = new GetAuditReportRequest
{
    AuditReportName = AuditReportName.FromProjectLocationAuditReport("[PROJECT]", "[LOCATION]", "[AUDIT_REPORT]"),
};
// Make the request
AuditReport response = await auditManagerClient.GetAuditReportAsync(request);

GetAuditReportAsync(GetAuditReportRequest, CancellationToken)

public virtual Task<AuditReport> GetAuditReportAsync(GetAuditReportRequest request, CancellationToken cancellationToken)

Gets the full metadata and findings for an audit report.

Parameters
Name Description
request GetAuditReportRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAuditReport

A Task containing the RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
GetAuditReportRequest request = new GetAuditReportRequest
{
    AuditReportName = AuditReportName.FromProjectLocationAuditReport("[PROJECT]", "[LOCATION]", "[AUDIT_REPORT]"),
};
// Make the request
AuditReport response = await auditManagerClient.GetAuditReportAsync(request);

GetAuditReportAsync(string, CallSettings)

public virtual Task<AuditReport> GetAuditReportAsync(string name, CallSettings callSettings = null)

Gets the full metadata and findings for an audit report.

Parameters
Name Description
name string

Required. 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}
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAuditReport

A Task containing the RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/auditReports/[AUDIT_REPORT]";
// Make the request
AuditReport response = await auditManagerClient.GetAuditReportAsync(name);

GetAuditReportAsync(string, CancellationToken)

public virtual Task<AuditReport> GetAuditReportAsync(string name, CancellationToken cancellationToken)

Gets the full metadata and findings for an audit report.

Parameters
Name Description
name string

Required. 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}
cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAuditReport

A Task containing the RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/auditReports/[AUDIT_REPORT]";
// Make the request
AuditReport response = await auditManagerClient.GetAuditReportAsync(name);

GetResourceEnrollmentStatus(GetResourceEnrollmentStatusRequest, CallSettings)

public virtual ResourceEnrollmentStatus GetResourceEnrollmentStatus(GetResourceEnrollmentStatusRequest request, CallSettings callSettings = null)

Gets a resource and its enrollment status.

Parameters
Name Description
request GetResourceEnrollmentStatusRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ResourceEnrollmentStatus

The RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = AuditManagerClient.Create();
// Initialize request argument(s)
GetResourceEnrollmentStatusRequest request = new GetResourceEnrollmentStatusRequest
{
    ResourceEnrollmentStatusName = ResourceEnrollmentStatusName.FromFolderLocationResourceEnrollmentStatus("[FOLDER]", "[LOCATION]", "[RESOURCE_ENROLLMENT_STATUS]"),
};
// Make the request
ResourceEnrollmentStatus response = auditManagerClient.GetResourceEnrollmentStatus(request);

GetResourceEnrollmentStatus(ResourceEnrollmentStatusName, CallSettings)

public virtual ResourceEnrollmentStatus GetResourceEnrollmentStatus(ResourceEnrollmentStatusName name, CallSettings callSettings = null)

Gets a resource and its enrollment status.

Parameters
Name Description
name ResourceEnrollmentStatusName

Required. 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}
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ResourceEnrollmentStatus

The RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = AuditManagerClient.Create();
// Initialize request argument(s)
ResourceEnrollmentStatusName name = ResourceEnrollmentStatusName.FromFolderLocationResourceEnrollmentStatus("[FOLDER]", "[LOCATION]", "[RESOURCE_ENROLLMENT_STATUS]");
// Make the request
ResourceEnrollmentStatus response = auditManagerClient.GetResourceEnrollmentStatus(name);

GetResourceEnrollmentStatus(string, CallSettings)

public virtual ResourceEnrollmentStatus GetResourceEnrollmentStatus(string name, CallSettings callSettings = null)

Gets a resource and its enrollment status.

Parameters
Name Description
name string

Required. 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}
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ResourceEnrollmentStatus

The RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = AuditManagerClient.Create();
// Initialize request argument(s)
string name = "folders/[FOLDER]/locations/[LOCATION]/resourceEnrollmentStatuses/[RESOURCE_ENROLLMENT_STATUS]";
// Make the request
ResourceEnrollmentStatus response = auditManagerClient.GetResourceEnrollmentStatus(name);

GetResourceEnrollmentStatusAsync(GetResourceEnrollmentStatusRequest, CallSettings)

public virtual Task<ResourceEnrollmentStatus> GetResourceEnrollmentStatusAsync(GetResourceEnrollmentStatusRequest request, CallSettings callSettings = null)

Gets a resource and its enrollment status.

Parameters
Name Description
request GetResourceEnrollmentStatusRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskResourceEnrollmentStatus

A Task containing the RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
GetResourceEnrollmentStatusRequest request = new GetResourceEnrollmentStatusRequest
{
    ResourceEnrollmentStatusName = ResourceEnrollmentStatusName.FromFolderLocationResourceEnrollmentStatus("[FOLDER]", "[LOCATION]", "[RESOURCE_ENROLLMENT_STATUS]"),
};
// Make the request
ResourceEnrollmentStatus response = await auditManagerClient.GetResourceEnrollmentStatusAsync(request);

GetResourceEnrollmentStatusAsync(GetResourceEnrollmentStatusRequest, CancellationToken)

public virtual Task<ResourceEnrollmentStatus> GetResourceEnrollmentStatusAsync(GetResourceEnrollmentStatusRequest request, CancellationToken cancellationToken)

Gets a resource and its enrollment status.

Parameters
Name Description
request GetResourceEnrollmentStatusRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskResourceEnrollmentStatus

A Task containing the RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
GetResourceEnrollmentStatusRequest request = new GetResourceEnrollmentStatusRequest
{
    ResourceEnrollmentStatusName = ResourceEnrollmentStatusName.FromFolderLocationResourceEnrollmentStatus("[FOLDER]", "[LOCATION]", "[RESOURCE_ENROLLMENT_STATUS]"),
};
// Make the request
ResourceEnrollmentStatus response = await auditManagerClient.GetResourceEnrollmentStatusAsync(request);

GetResourceEnrollmentStatusAsync(ResourceEnrollmentStatusName, CallSettings)

public virtual Task<ResourceEnrollmentStatus> GetResourceEnrollmentStatusAsync(ResourceEnrollmentStatusName name, CallSettings callSettings = null)

Gets a resource and its enrollment status.

Parameters
Name Description
name ResourceEnrollmentStatusName

Required. 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}
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskResourceEnrollmentStatus

A Task containing the RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
ResourceEnrollmentStatusName name = ResourceEnrollmentStatusName.FromFolderLocationResourceEnrollmentStatus("[FOLDER]", "[LOCATION]", "[RESOURCE_ENROLLMENT_STATUS]");
// Make the request
ResourceEnrollmentStatus response = await auditManagerClient.GetResourceEnrollmentStatusAsync(name);

GetResourceEnrollmentStatusAsync(ResourceEnrollmentStatusName, CancellationToken)

public virtual Task<ResourceEnrollmentStatus> GetResourceEnrollmentStatusAsync(ResourceEnrollmentStatusName name, CancellationToken cancellationToken)

Gets a resource and its enrollment status.

Parameters
Name Description
name ResourceEnrollmentStatusName

Required. 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}
cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskResourceEnrollmentStatus

A Task containing the RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
ResourceEnrollmentStatusName name = ResourceEnrollmentStatusName.FromFolderLocationResourceEnrollmentStatus("[FOLDER]", "[LOCATION]", "[RESOURCE_ENROLLMENT_STATUS]");
// Make the request
ResourceEnrollmentStatus response = await auditManagerClient.GetResourceEnrollmentStatusAsync(name);

GetResourceEnrollmentStatusAsync(string, CallSettings)

public virtual Task<ResourceEnrollmentStatus> GetResourceEnrollmentStatusAsync(string name, CallSettings callSettings = null)

Gets a resource and its enrollment status.

Parameters
Name Description
name string

Required. 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}
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskResourceEnrollmentStatus

A Task containing the RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "folders/[FOLDER]/locations/[LOCATION]/resourceEnrollmentStatuses/[RESOURCE_ENROLLMENT_STATUS]";
// Make the request
ResourceEnrollmentStatus response = await auditManagerClient.GetResourceEnrollmentStatusAsync(name);

GetResourceEnrollmentStatusAsync(string, CancellationToken)

public virtual Task<ResourceEnrollmentStatus> GetResourceEnrollmentStatusAsync(string name, CancellationToken cancellationToken)

Gets a resource and its enrollment status.

Parameters
Name Description
name string

Required. 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}
cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskResourceEnrollmentStatus

A Task containing the RPC response.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "folders/[FOLDER]/locations/[LOCATION]/resourceEnrollmentStatuses/[RESOURCE_ENROLLMENT_STATUS]";
// Make the request
ResourceEnrollmentStatus response = await auditManagerClient.GetResourceEnrollmentStatusAsync(name);

ListAuditReports(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListAuditReportsResponse, AuditReport> ListAuditReports(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the audit reports for the organization, folder, or project that you specify as the parent scope.

Parameters
Name Description
parent LocationName

Required. 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}
pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListAuditReportsResponseAuditReport

A pageable sequence of AuditReport resources.

Example
// Create client
AuditManagerClient auditManagerClient = AuditManagerClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListAuditReportsResponse, AuditReport> response = auditManagerClient.ListAuditReports(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (AuditReport item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAuditReportsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AuditReport item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AuditReport> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AuditReport item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAuditReports(EnrollmentStatusScopeName, string, int?, CallSettings)

public virtual PagedEnumerable<ListAuditReportsResponse, AuditReport> ListAuditReports(EnrollmentStatusScopeName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the audit reports for the organization, folder, or project that you specify as the parent scope.

Parameters
Name Description
parent EnrollmentStatusScopeName

Required. 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}
pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListAuditReportsResponseAuditReport

A pageable sequence of AuditReport resources.

Example
// Create client
AuditManagerClient auditManagerClient = AuditManagerClient.Create();
// Initialize request argument(s)
EnrollmentStatusScopeName parent = EnrollmentStatusScopeName.FromFolderLocation("[FOLDER]", "[LOCATION]");
// Make the request
PagedEnumerable<ListAuditReportsResponse, AuditReport> response = auditManagerClient.ListAuditReports(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (AuditReport item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAuditReportsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AuditReport item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AuditReport> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AuditReport item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAuditReports(FolderLocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListAuditReportsResponse, AuditReport> ListAuditReports(FolderLocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the audit reports for the organization, folder, or project that you specify as the parent scope.

Parameters
Name Description
parent FolderLocationName

Required. 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}
pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListAuditReportsResponseAuditReport

A pageable sequence of AuditReport resources.

Example
// Create client
AuditManagerClient auditManagerClient = AuditManagerClient.Create();
// Initialize request argument(s)
FolderLocationName parent = FolderLocationName.FromFolderLocation("[FOLDER]", "[LOCATION]");
// Make the request
PagedEnumerable<ListAuditReportsResponse, AuditReport> response = auditManagerClient.ListAuditReports(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (AuditReport item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAuditReportsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AuditReport item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AuditReport> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AuditReport item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAuditReports(ListAuditReportsRequest, CallSettings)

public virtual PagedEnumerable<ListAuditReportsResponse, AuditReport> ListAuditReports(ListAuditReportsRequest request, CallSettings callSettings = null)

Lists the audit reports for the organization, folder, or project that you specify as the parent scope.

Parameters
Name Description
request ListAuditReportsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListAuditReportsResponseAuditReport

A pageable sequence of AuditReport resources.

Example
// Create client
AuditManagerClient auditManagerClient = AuditManagerClient.Create();
// Initialize request argument(s)
ListAuditReportsRequest request = new ListAuditReportsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListAuditReportsResponse, AuditReport> response = auditManagerClient.ListAuditReports(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (AuditReport item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAuditReportsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AuditReport item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AuditReport> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AuditReport item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAuditReports(OrganizationLocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListAuditReportsResponse, AuditReport> ListAuditReports(OrganizationLocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the audit reports for the organization, folder, or project that you specify as the parent scope.

Parameters
Name Description
parent OrganizationLocationName

Required. 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}
pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListAuditReportsResponseAuditReport

A pageable sequence of AuditReport resources.

Example
// Create client
AuditManagerClient auditManagerClient = AuditManagerClient.Create();
// Initialize request argument(s)
OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
// Make the request
PagedEnumerable<ListAuditReportsResponse, AuditReport> response = auditManagerClient.ListAuditReports(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (AuditReport item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAuditReportsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AuditReport item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AuditReport> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AuditReport item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAuditReports(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListAuditReportsResponse, AuditReport> ListAuditReports(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the audit reports for the organization, folder, or project that you specify as the parent scope.

Parameters
Name Description
parent string

Required. 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}
pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListAuditReportsResponseAuditReport

A pageable sequence of AuditReport resources.

Example
// Create client
AuditManagerClient auditManagerClient = AuditManagerClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListAuditReportsResponse, AuditReport> response = auditManagerClient.ListAuditReports(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (AuditReport item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAuditReportsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AuditReport item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AuditReport> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AuditReport item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAuditReportsAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListAuditReportsResponse, AuditReport> ListAuditReportsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the audit reports for the organization, folder, or project that you specify as the parent scope.

Parameters
Name Description
parent LocationName

Required. 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}
pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListAuditReportsResponseAuditReport

A pageable asynchronous sequence of AuditReport resources.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListAuditReportsResponse, AuditReport> response = auditManagerClient.ListAuditReportsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (AuditReport item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAuditReportsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AuditReport item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AuditReport> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AuditReport item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAuditReportsAsync(EnrollmentStatusScopeName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListAuditReportsResponse, AuditReport> ListAuditReportsAsync(EnrollmentStatusScopeName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the audit reports for the organization, folder, or project that you specify as the parent scope.

Parameters
Name Description
parent EnrollmentStatusScopeName

Required. 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}
pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListAuditReportsResponseAuditReport

A pageable asynchronous sequence of AuditReport resources.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
EnrollmentStatusScopeName parent = EnrollmentStatusScopeName.FromFolderLocation("[FOLDER]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListAuditReportsResponse, AuditReport> response = auditManagerClient.ListAuditReportsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (AuditReport item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAuditReportsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AuditReport item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AuditReport> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AuditReport item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAuditReportsAsync(FolderLocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListAuditReportsResponse, AuditReport> ListAuditReportsAsync(FolderLocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the audit reports for the organization, folder, or project that you specify as the parent scope.

Parameters
Name Description
parent FolderLocationName

Required. 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}
pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListAuditReportsResponseAuditReport

A pageable asynchronous sequence of AuditReport resources.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
FolderLocationName parent = FolderLocationName.FromFolderLocation("[FOLDER]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListAuditReportsResponse, AuditReport> response = auditManagerClient.ListAuditReportsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (AuditReport item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAuditReportsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AuditReport item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AuditReport> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AuditReport item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAuditReportsAsync(ListAuditReportsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListAuditReportsResponse, AuditReport> ListAuditReportsAsync(ListAuditReportsRequest request, CallSettings callSettings = null)

Lists the audit reports for the organization, folder, or project that you specify as the parent scope.

Parameters
Name Description
request ListAuditReportsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListAuditReportsResponseAuditReport

A pageable asynchronous sequence of AuditReport resources.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
ListAuditReportsRequest request = new ListAuditReportsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListAuditReportsResponse, AuditReport> response = auditManagerClient.ListAuditReportsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (AuditReport item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAuditReportsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AuditReport item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AuditReport> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AuditReport item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAuditReportsAsync(OrganizationLocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListAuditReportsResponse, AuditReport> ListAuditReportsAsync(OrganizationLocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the audit reports for the organization, folder, or project that you specify as the parent scope.

Parameters
Name Description
parent OrganizationLocationName

Required. 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}
pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListAuditReportsResponseAuditReport

A pageable asynchronous sequence of AuditReport resources.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListAuditReportsResponse, AuditReport> response = auditManagerClient.ListAuditReportsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (AuditReport item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAuditReportsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AuditReport item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AuditReport> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AuditReport item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAuditReportsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListAuditReportsResponse, AuditReport> ListAuditReportsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the audit reports for the organization, folder, or project that you specify as the parent scope.

Parameters
Name Description
parent string

Required. 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}
pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListAuditReportsResponseAuditReport

A pageable asynchronous sequence of AuditReport resources.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListAuditReportsResponse, AuditReport> response = auditManagerClient.ListAuditReportsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (AuditReport item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAuditReportsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AuditReport item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AuditReport> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AuditReport item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListControls(ListControlsRequest, CallSettings)

public virtual PagedEnumerable<ListControlsResponse, Control> ListControls(ListControlsRequest request, CallSettings callSettings = null)

Lists the controls that you must implement to become compliant to a regulatory standard.

Parameters
Name Description
request ListControlsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListControlsResponseControl

A pageable sequence of Control resources.

Example
// Create client
AuditManagerClient auditManagerClient = AuditManagerClient.Create();
// Initialize request argument(s)
ListControlsRequest request = new ListControlsRequest
{
    ParentAsStandardName = StandardName.FromProjectLocationStandard("[PROJECT]", "[LOCATION]", "[STANDARD]"),
};
// Make the request
PagedEnumerable<ListControlsResponse, Control> response = auditManagerClient.ListControls(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Control item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListControlsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Control item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Control> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Control item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListControls(StandardName, string, int?, CallSettings)

public virtual PagedEnumerable<ListControlsResponse, Control> ListControls(StandardName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the controls that you must implement to become compliant to a regulatory standard.

Parameters
Name Description
parent StandardName

Required. 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}
pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListControlsResponseControl

A pageable sequence of Control resources.

Example
// Create client
AuditManagerClient auditManagerClient = AuditManagerClient.Create();
// Initialize request argument(s)
StandardName parent = StandardName.FromProjectLocationStandard("[PROJECT]", "[LOCATION]", "[STANDARD]");
// Make the request
PagedEnumerable<ListControlsResponse, Control> response = auditManagerClient.ListControls(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Control item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListControlsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Control item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Control> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Control item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListControls(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListControlsResponse, Control> ListControls(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the controls that you must implement to become compliant to a regulatory standard.

Parameters
Name Description
parent string

Required. 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}
pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListControlsResponseControl

A pageable sequence of Control resources.

Example
// Create client
AuditManagerClient auditManagerClient = AuditManagerClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/standards/[STANDARD]";
// Make the request
PagedEnumerable<ListControlsResponse, Control> response = auditManagerClient.ListControls(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Control item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListControlsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Control item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Control> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Control item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListControlsAsync(ListControlsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListControlsResponse, Control> ListControlsAsync(ListControlsRequest request, CallSettings callSettings = null)

Lists the controls that you must implement to become compliant to a regulatory standard.

Parameters
Name Description
request ListControlsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListControlsResponseControl

A pageable asynchronous sequence of Control resources.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
ListControlsRequest request = new ListControlsRequest
{
    ParentAsStandardName = StandardName.FromProjectLocationStandard("[PROJECT]", "[LOCATION]", "[STANDARD]"),
};
// Make the request
PagedAsyncEnumerable<ListControlsResponse, Control> response = auditManagerClient.ListControlsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (Control item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListControlsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Control item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Control> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Control item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListControlsAsync(StandardName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListControlsResponse, Control> ListControlsAsync(StandardName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the controls that you must implement to become compliant to a regulatory standard.

Parameters
Name Description
parent StandardName

Required. 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}
pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListControlsResponseControl

A pageable asynchronous sequence of Control resources.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
StandardName parent = StandardName.FromProjectLocationStandard("[PROJECT]", "[LOCATION]", "[STANDARD]");
// Make the request
PagedAsyncEnumerable<ListControlsResponse, Control> response = auditManagerClient.ListControlsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (Control item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListControlsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Control item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Control> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Control item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListControlsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListControlsResponse, Control> ListControlsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the controls that you must implement to become compliant to a regulatory standard.

Parameters
Name Description
parent string

Required. 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}
pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListControlsResponseControl

A pageable asynchronous sequence of Control resources.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/standards/[STANDARD]";
// Make the request
PagedAsyncEnumerable<ListControlsResponse, Control> response = auditManagerClient.ListControlsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (Control item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListControlsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Control item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Control> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Control item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListResourceEnrollmentStatuses(EnrollmentStatusScopeName, string, int?, CallSettings)

public virtual PagedEnumerable<ListResourceEnrollmentStatusesResponse, ResourceEnrollmentStatus> ListResourceEnrollmentStatuses(EnrollmentStatusScopeName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all the folders and projects in an organization or folder, along with their enrollments.

Parameters
Name Description
parent EnrollmentStatusScopeName

Required. Parent organization or folder to list enrollment statuses for, in one of the following formats:

  • folders/{folder}/locations/{location}
  • organizations/{organization}/locations/{location}
pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListResourceEnrollmentStatusesResponseResourceEnrollmentStatus

A pageable sequence of ResourceEnrollmentStatus resources.

Example
// Create client
AuditManagerClient auditManagerClient = AuditManagerClient.Create();
// Initialize request argument(s)
EnrollmentStatusScopeName parent = EnrollmentStatusScopeName.FromFolderLocation("[FOLDER]", "[LOCATION]");
// Make the request
PagedEnumerable<ListResourceEnrollmentStatusesResponse, ResourceEnrollmentStatus> response = auditManagerClient.ListResourceEnrollmentStatuses(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (ResourceEnrollmentStatus item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListResourceEnrollmentStatusesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ResourceEnrollmentStatus item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ResourceEnrollmentStatus> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ResourceEnrollmentStatus item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListResourceEnrollmentStatuses(ListResourceEnrollmentStatusesRequest, CallSettings)

public virtual PagedEnumerable<ListResourceEnrollmentStatusesResponse, ResourceEnrollmentStatus> ListResourceEnrollmentStatuses(ListResourceEnrollmentStatusesRequest request, CallSettings callSettings = null)

Lists all the folders and projects in an organization or folder, along with their enrollments.

Parameters
Name Description
request ListResourceEnrollmentStatusesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListResourceEnrollmentStatusesResponseResourceEnrollmentStatus

A pageable sequence of ResourceEnrollmentStatus resources.

Example
// Create client
AuditManagerClient auditManagerClient = AuditManagerClient.Create();
// Initialize request argument(s)
ListResourceEnrollmentStatusesRequest request = new ListResourceEnrollmentStatusesRequest
{
    ParentAsEnrollmentStatusScopeName = EnrollmentStatusScopeName.FromFolderLocation("[FOLDER]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListResourceEnrollmentStatusesResponse, ResourceEnrollmentStatus> response = auditManagerClient.ListResourceEnrollmentStatuses(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (ResourceEnrollmentStatus item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListResourceEnrollmentStatusesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ResourceEnrollmentStatus item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ResourceEnrollmentStatus> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ResourceEnrollmentStatus item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListResourceEnrollmentStatuses(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListResourceEnrollmentStatusesResponse, ResourceEnrollmentStatus> ListResourceEnrollmentStatuses(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all the folders and projects in an organization or folder, along with their enrollments.

Parameters
Name Description
parent string

Required. Parent organization or folder to list enrollment statuses for, in one of the following formats:

  • folders/{folder}/locations/{location}
  • organizations/{organization}/locations/{location}
pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListResourceEnrollmentStatusesResponseResourceEnrollmentStatus

A pageable sequence of ResourceEnrollmentStatus resources.

Example
// Create client
AuditManagerClient auditManagerClient = AuditManagerClient.Create();
// Initialize request argument(s)
string parent = "folders/[FOLDER]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListResourceEnrollmentStatusesResponse, ResourceEnrollmentStatus> response = auditManagerClient.ListResourceEnrollmentStatuses(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (ResourceEnrollmentStatus item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListResourceEnrollmentStatusesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ResourceEnrollmentStatus item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ResourceEnrollmentStatus> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ResourceEnrollmentStatus item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListResourceEnrollmentStatusesAsync(EnrollmentStatusScopeName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListResourceEnrollmentStatusesResponse, ResourceEnrollmentStatus> ListResourceEnrollmentStatusesAsync(EnrollmentStatusScopeName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all the folders and projects in an organization or folder, along with their enrollments.

Parameters
Name Description
parent EnrollmentStatusScopeName

Required. Parent organization or folder to list enrollment statuses for, in one of the following formats:

  • folders/{folder}/locations/{location}
  • organizations/{organization}/locations/{location}
pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListResourceEnrollmentStatusesResponseResourceEnrollmentStatus

A pageable asynchronous sequence of ResourceEnrollmentStatus resources.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
EnrollmentStatusScopeName parent = EnrollmentStatusScopeName.FromFolderLocation("[FOLDER]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListResourceEnrollmentStatusesResponse, ResourceEnrollmentStatus> response = auditManagerClient.ListResourceEnrollmentStatusesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (ResourceEnrollmentStatus item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListResourceEnrollmentStatusesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ResourceEnrollmentStatus item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ResourceEnrollmentStatus> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ResourceEnrollmentStatus item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListResourceEnrollmentStatusesAsync(ListResourceEnrollmentStatusesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListResourceEnrollmentStatusesResponse, ResourceEnrollmentStatus> ListResourceEnrollmentStatusesAsync(ListResourceEnrollmentStatusesRequest request, CallSettings callSettings = null)

Lists all the folders and projects in an organization or folder, along with their enrollments.

Parameters
Name Description
request ListResourceEnrollmentStatusesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListResourceEnrollmentStatusesResponseResourceEnrollmentStatus

A pageable asynchronous sequence of ResourceEnrollmentStatus resources.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
ListResourceEnrollmentStatusesRequest request = new ListResourceEnrollmentStatusesRequest
{
    ParentAsEnrollmentStatusScopeName = EnrollmentStatusScopeName.FromFolderLocation("[FOLDER]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListResourceEnrollmentStatusesResponse, ResourceEnrollmentStatus> response = auditManagerClient.ListResourceEnrollmentStatusesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (ResourceEnrollmentStatus item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListResourceEnrollmentStatusesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ResourceEnrollmentStatus item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ResourceEnrollmentStatus> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ResourceEnrollmentStatus item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListResourceEnrollmentStatusesAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListResourceEnrollmentStatusesResponse, ResourceEnrollmentStatus> ListResourceEnrollmentStatusesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all the folders and projects in an organization or folder, along with their enrollments.

Parameters
Name Description
parent string

Required. Parent organization or folder to list enrollment statuses for, in one of the following formats:

  • folders/{folder}/locations/{location}
  • organizations/{organization}/locations/{location}
pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListResourceEnrollmentStatusesResponseResourceEnrollmentStatus

A pageable asynchronous sequence of ResourceEnrollmentStatus resources.

Example
// Create client
AuditManagerClient auditManagerClient = await AuditManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "folders/[FOLDER]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListResourceEnrollmentStatusesResponse, ResourceEnrollmentStatus> response = auditManagerClient.ListResourceEnrollmentStatusesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (ResourceEnrollmentStatus item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListResourceEnrollmentStatusesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ResourceEnrollmentStatus item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ResourceEnrollmentStatus> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ResourceEnrollmentStatus item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

PollOnceGenerateAuditReport(string, CallSettings)

public virtual Operation<AuditReport, OperationMetadata> PollOnceGenerateAuditReport(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of GenerateAuditReport .

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationAuditReportOperationMetadata

The result of polling the operation.

PollOnceGenerateAuditReportAsync(string, CallSettings)

public virtual Task<Operation<AuditReport, OperationMetadata>> PollOnceGenerateAuditReportAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of GenerateAuditReport.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationAuditReportOperationMetadata

A task representing the result of polling the operation.

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.