Class SecurityCenterSettingsServiceClient (2.0.0-beta01)

public abstract class SecurityCenterSettingsServiceClient

SecurityCenterSettingsService client wrapper, for convenient use.

Inheritance

Object > SecurityCenterSettingsServiceClient

Namespace

Google.Cloud.SecurityCenter.Settings.V1Beta1

Assembly

Google.Cloud.SecurityCenter.Settings.V1Beta1.dll

Remarks

API Overview

The SecurityCenterSettingsService is a sub-api of securitycenter.googleapis.com. The service provides methods to manage Security Center Settings, and Component Settings for GCP organizations, folders, projects, and clusters.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default SecurityCenterSettingsService scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

The default SecurityCenterSettingsService scopes are:

GrpcClient

public virtual SecurityCenterSettingsService.SecurityCenterSettingsServiceClient GrpcClient { get; }

The underlying gRPC SecurityCenterSettingsService client

Property Value
TypeDescription
SecurityCenterSettingsService.SecurityCenterSettingsServiceClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

BatchCalculateEffectiveSettings(BatchCalculateEffectiveSettingsRequest, CallSettings)

public virtual BatchCalculateEffectiveSettingsResponse BatchCalculateEffectiveSettings(BatchCalculateEffectiveSettingsRequest request, CallSettings callSettings = null)

Gets a list of effective settings.

Parameters
NameDescription
requestBatchCalculateEffectiveSettingsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
BatchCalculateEffectiveSettingsResponse

The RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = SecurityCenterSettingsServiceClient.Create();
// Initialize request argument(s)
BatchCalculateEffectiveSettingsRequest request = new BatchCalculateEffectiveSettingsRequest
{
    ParentAsOrganizationName = OrganizationName.FromOrganization("[ORGANIZATION]"),
    Requests =
    {
        new CalculateEffectiveSettingsRequest(),
    },
};
// Make the request
BatchCalculateEffectiveSettingsResponse response = securityCenterSettingsServiceClient.BatchCalculateEffectiveSettings(request);

BatchCalculateEffectiveSettingsAsync(BatchCalculateEffectiveSettingsRequest, CallSettings)

public virtual Task<BatchCalculateEffectiveSettingsResponse> BatchCalculateEffectiveSettingsAsync(BatchCalculateEffectiveSettingsRequest request, CallSettings callSettings = null)

Gets a list of effective settings.

Parameters
NameDescription
requestBatchCalculateEffectiveSettingsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<BatchCalculateEffectiveSettingsResponse>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
BatchCalculateEffectiveSettingsRequest request = new BatchCalculateEffectiveSettingsRequest
{
    ParentAsOrganizationName = OrganizationName.FromOrganization("[ORGANIZATION]"),
    Requests =
    {
        new CalculateEffectiveSettingsRequest(),
    },
};
// Make the request
BatchCalculateEffectiveSettingsResponse response = await securityCenterSettingsServiceClient.BatchCalculateEffectiveSettingsAsync(request);

BatchCalculateEffectiveSettingsAsync(BatchCalculateEffectiveSettingsRequest, CancellationToken)

public virtual Task<BatchCalculateEffectiveSettingsResponse> BatchCalculateEffectiveSettingsAsync(BatchCalculateEffectiveSettingsRequest request, CancellationToken cancellationToken)

Gets a list of effective settings.

Parameters
NameDescription
requestBatchCalculateEffectiveSettingsRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<BatchCalculateEffectiveSettingsResponse>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
BatchCalculateEffectiveSettingsRequest request = new BatchCalculateEffectiveSettingsRequest
{
    ParentAsOrganizationName = OrganizationName.FromOrganization("[ORGANIZATION]"),
    Requests =
    {
        new CalculateEffectiveSettingsRequest(),
    },
};
// Make the request
BatchCalculateEffectiveSettingsResponse response = await securityCenterSettingsServiceClient.BatchCalculateEffectiveSettingsAsync(request);

BatchGetSettings(BatchGetSettingsRequest, CallSettings)

public virtual BatchGetSettingsResponse BatchGetSettings(BatchGetSettingsRequest request, CallSettings callSettings = null)

Gets a list of settings.

Parameters
NameDescription
requestBatchGetSettingsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
BatchGetSettingsResponse

The RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = SecurityCenterSettingsServiceClient.Create();
// Initialize request argument(s)
BatchGetSettingsRequest request = new BatchGetSettingsRequest
{
    ParentAsOrganizationName = OrganizationName.FromOrganization("[ORGANIZATION]"),
    Names = { "", },
};
// Make the request
BatchGetSettingsResponse response = securityCenterSettingsServiceClient.BatchGetSettings(request);

BatchGetSettingsAsync(BatchGetSettingsRequest, CallSettings)

public virtual Task<BatchGetSettingsResponse> BatchGetSettingsAsync(BatchGetSettingsRequest request, CallSettings callSettings = null)

Gets a list of settings.

Parameters
NameDescription
requestBatchGetSettingsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<BatchGetSettingsResponse>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
BatchGetSettingsRequest request = new BatchGetSettingsRequest
{
    ParentAsOrganizationName = OrganizationName.FromOrganization("[ORGANIZATION]"),
    Names = { "", },
};
// Make the request
BatchGetSettingsResponse response = await securityCenterSettingsServiceClient.BatchGetSettingsAsync(request);

BatchGetSettingsAsync(BatchGetSettingsRequest, CancellationToken)

public virtual Task<BatchGetSettingsResponse> BatchGetSettingsAsync(BatchGetSettingsRequest request, CancellationToken cancellationToken)

Gets a list of settings.

Parameters
NameDescription
requestBatchGetSettingsRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<BatchGetSettingsResponse>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
BatchGetSettingsRequest request = new BatchGetSettingsRequest
{
    ParentAsOrganizationName = OrganizationName.FromOrganization("[ORGANIZATION]"),
    Names = { "", },
};
// Make the request
BatchGetSettingsResponse response = await securityCenterSettingsServiceClient.BatchGetSettingsAsync(request);

CalculateEffectiveComponentSettings(CalculateEffectiveComponentSettingsRequest, CallSettings)

public virtual ComponentSettings CalculateEffectiveComponentSettings(CalculateEffectiveComponentSettingsRequest request, CallSettings callSettings = null)

Gets the Effective Component Settings.

Parameters
NameDescription
requestCalculateEffectiveComponentSettingsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ComponentSettings

The RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = SecurityCenterSettingsServiceClient.Create();
// Initialize request argument(s)
CalculateEffectiveComponentSettingsRequest request = new CalculateEffectiveComponentSettingsRequest
{
    ComponentSettingsName = ComponentSettingsName.FromOrganizationComponent("[ORGANIZATION]", "[COMPONENT]"),
};
// Make the request
ComponentSettings response = securityCenterSettingsServiceClient.CalculateEffectiveComponentSettings(request);

CalculateEffectiveComponentSettings(ComponentSettingsName, CallSettings)

public virtual ComponentSettings CalculateEffectiveComponentSettings(ComponentSettingsName name, CallSettings callSettings = null)

Gets the Effective Component Settings.

Parameters
NameDescription
nameComponentSettingsName

Required. The effective component settings to retrieve.

Formats:

  • organizations/{organization}/components/{component}/settings
  • folders/{folder}/components/{component}/settings
  • projects/{project}/components/{component}/settings
  • projects/{project}/locations/{location}/clusters/{cluster}/components/{component}/settings
  • projects/{project}/regions/{region}/clusters/{cluster}/components/{component}/settings
  • projects/{project}/zones/{zone}/clusters/{cluster}/components/{component}/settings
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ComponentSettings

The RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = SecurityCenterSettingsServiceClient.Create();
// Initialize request argument(s)
ComponentSettingsName name = ComponentSettingsName.FromOrganizationComponent("[ORGANIZATION]", "[COMPONENT]");
// Make the request
ComponentSettings response = securityCenterSettingsServiceClient.CalculateEffectiveComponentSettings(name);

CalculateEffectiveComponentSettings(String, CallSettings)

public virtual ComponentSettings CalculateEffectiveComponentSettings(string name, CallSettings callSettings = null)

Gets the Effective Component Settings.

Parameters
NameDescription
nameString

Required. The effective component settings to retrieve.

Formats:

  • organizations/{organization}/components/{component}/settings
  • folders/{folder}/components/{component}/settings
  • projects/{project}/components/{component}/settings
  • projects/{project}/locations/{location}/clusters/{cluster}/components/{component}/settings
  • projects/{project}/regions/{region}/clusters/{cluster}/components/{component}/settings
  • projects/{project}/zones/{zone}/clusters/{cluster}/components/{component}/settings
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ComponentSettings

The RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = SecurityCenterSettingsServiceClient.Create();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/components/[COMPONENT]/settings";
// Make the request
ComponentSettings response = securityCenterSettingsServiceClient.CalculateEffectiveComponentSettings(name);

CalculateEffectiveComponentSettingsAsync(CalculateEffectiveComponentSettingsRequest, CallSettings)

public virtual Task<ComponentSettings> CalculateEffectiveComponentSettingsAsync(CalculateEffectiveComponentSettingsRequest request, CallSettings callSettings = null)

Gets the Effective Component Settings.

Parameters
NameDescription
requestCalculateEffectiveComponentSettingsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ComponentSettings>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
CalculateEffectiveComponentSettingsRequest request = new CalculateEffectiveComponentSettingsRequest
{
    ComponentSettingsName = ComponentSettingsName.FromOrganizationComponent("[ORGANIZATION]", "[COMPONENT]"),
};
// Make the request
ComponentSettings response = await securityCenterSettingsServiceClient.CalculateEffectiveComponentSettingsAsync(request);

CalculateEffectiveComponentSettingsAsync(CalculateEffectiveComponentSettingsRequest, CancellationToken)

public virtual Task<ComponentSettings> CalculateEffectiveComponentSettingsAsync(CalculateEffectiveComponentSettingsRequest request, CancellationToken cancellationToken)

Gets the Effective Component Settings.

Parameters
NameDescription
requestCalculateEffectiveComponentSettingsRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ComponentSettings>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
CalculateEffectiveComponentSettingsRequest request = new CalculateEffectiveComponentSettingsRequest
{
    ComponentSettingsName = ComponentSettingsName.FromOrganizationComponent("[ORGANIZATION]", "[COMPONENT]"),
};
// Make the request
ComponentSettings response = await securityCenterSettingsServiceClient.CalculateEffectiveComponentSettingsAsync(request);

CalculateEffectiveComponentSettingsAsync(ComponentSettingsName, CallSettings)

public virtual Task<ComponentSettings> CalculateEffectiveComponentSettingsAsync(ComponentSettingsName name, CallSettings callSettings = null)

Gets the Effective Component Settings.

Parameters
NameDescription
nameComponentSettingsName

Required. The effective component settings to retrieve.

Formats:

  • organizations/{organization}/components/{component}/settings
  • folders/{folder}/components/{component}/settings
  • projects/{project}/components/{component}/settings
  • projects/{project}/locations/{location}/clusters/{cluster}/components/{component}/settings
  • projects/{project}/regions/{region}/clusters/{cluster}/components/{component}/settings
  • projects/{project}/zones/{zone}/clusters/{cluster}/components/{component}/settings
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ComponentSettings>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
ComponentSettingsName name = ComponentSettingsName.FromOrganizationComponent("[ORGANIZATION]", "[COMPONENT]");
// Make the request
ComponentSettings response = await securityCenterSettingsServiceClient.CalculateEffectiveComponentSettingsAsync(name);

CalculateEffectiveComponentSettingsAsync(ComponentSettingsName, CancellationToken)

public virtual Task<ComponentSettings> CalculateEffectiveComponentSettingsAsync(ComponentSettingsName name, CancellationToken cancellationToken)

Gets the Effective Component Settings.

Parameters
NameDescription
nameComponentSettingsName

Required. The effective component settings to retrieve.

Formats:

  • organizations/{organization}/components/{component}/settings
  • folders/{folder}/components/{component}/settings
  • projects/{project}/components/{component}/settings
  • projects/{project}/locations/{location}/clusters/{cluster}/components/{component}/settings
  • projects/{project}/regions/{region}/clusters/{cluster}/components/{component}/settings
  • projects/{project}/zones/{zone}/clusters/{cluster}/components/{component}/settings
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ComponentSettings>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
ComponentSettingsName name = ComponentSettingsName.FromOrganizationComponent("[ORGANIZATION]", "[COMPONENT]");
// Make the request
ComponentSettings response = await securityCenterSettingsServiceClient.CalculateEffectiveComponentSettingsAsync(name);

CalculateEffectiveComponentSettingsAsync(String, CallSettings)

public virtual Task<ComponentSettings> CalculateEffectiveComponentSettingsAsync(string name, CallSettings callSettings = null)

Gets the Effective Component Settings.

Parameters
NameDescription
nameString

Required. The effective component settings to retrieve.

Formats:

  • organizations/{organization}/components/{component}/settings
  • folders/{folder}/components/{component}/settings
  • projects/{project}/components/{component}/settings
  • projects/{project}/locations/{location}/clusters/{cluster}/components/{component}/settings
  • projects/{project}/regions/{region}/clusters/{cluster}/components/{component}/settings
  • projects/{project}/zones/{zone}/clusters/{cluster}/components/{component}/settings
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ComponentSettings>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/components/[COMPONENT]/settings";
// Make the request
ComponentSettings response = await securityCenterSettingsServiceClient.CalculateEffectiveComponentSettingsAsync(name);

CalculateEffectiveComponentSettingsAsync(String, CancellationToken)

public virtual Task<ComponentSettings> CalculateEffectiveComponentSettingsAsync(string name, CancellationToken cancellationToken)

Gets the Effective Component Settings.

Parameters
NameDescription
nameString

Required. The effective component settings to retrieve.

Formats:

  • organizations/{organization}/components/{component}/settings
  • folders/{folder}/components/{component}/settings
  • projects/{project}/components/{component}/settings
  • projects/{project}/locations/{location}/clusters/{cluster}/components/{component}/settings
  • projects/{project}/regions/{region}/clusters/{cluster}/components/{component}/settings
  • projects/{project}/zones/{zone}/clusters/{cluster}/components/{component}/settings
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ComponentSettings>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/components/[COMPONENT]/settings";
// Make the request
ComponentSettings response = await securityCenterSettingsServiceClient.CalculateEffectiveComponentSettingsAsync(name);

CalculateEffectiveSettings(CalculateEffectiveSettingsRequest, CallSettings)

public virtual Settings CalculateEffectiveSettings(CalculateEffectiveSettingsRequest request, CallSettings callSettings = null)

CalculateEffectiveSettings looks up all of the Security Center Settings resources in the GCP resource hierarchy, and calculates the effective settings on that resource by applying the following rules:

  • Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings).
  • Product defaults can be overridden at org, folder, project, and cluster levels.
  • Detectors will be filtered out if they belong to a billing tier the customer has not configured.
Parameters
NameDescription
requestCalculateEffectiveSettingsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Settings

The RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = SecurityCenterSettingsServiceClient.Create();
// Initialize request argument(s)
CalculateEffectiveSettingsRequest request = new CalculateEffectiveSettingsRequest
{
    SettingsName = SettingsName.FromOrganization("[ORGANIZATION]"),
};
// Make the request
Settings response = securityCenterSettingsServiceClient.CalculateEffectiveSettings(request);

CalculateEffectiveSettings(SettingsName, CallSettings)

public virtual Settings CalculateEffectiveSettings(SettingsName name, CallSettings callSettings = null)

CalculateEffectiveSettings looks up all of the Security Center Settings resources in the GCP resource hierarchy, and calculates the effective settings on that resource by applying the following rules:

  • Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings).
  • Product defaults can be overridden at org, folder, project, and cluster levels.
  • Detectors will be filtered out if they belong to a billing tier the customer has not configured.
Parameters
NameDescription
nameSettingsName

Required. The name of the effective settings to retrieve. Formats:

  • organizations/{organization}/effectiveSettings
  • folders/{folder}/effectiveSettings
  • projects/{project}/effectiveSettings
  • projects/{project}/locations/{location}/clusters/{cluster}/effectiveSettings
  • projects/{project}/regions/{region}/clusters/{cluster}/effectiveSettings
  • projects/{project}/zones/{zone}/clusters/{cluster}/effectiveSettings
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Settings

The RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = SecurityCenterSettingsServiceClient.Create();
// Initialize request argument(s)
SettingsName name = SettingsName.FromOrganization("[ORGANIZATION]");
// Make the request
Settings response = securityCenterSettingsServiceClient.CalculateEffectiveSettings(name);

CalculateEffectiveSettings(String, CallSettings)

public virtual Settings CalculateEffectiveSettings(string name, CallSettings callSettings = null)

CalculateEffectiveSettings looks up all of the Security Center Settings resources in the GCP resource hierarchy, and calculates the effective settings on that resource by applying the following rules:

  • Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings).
  • Product defaults can be overridden at org, folder, project, and cluster levels.
  • Detectors will be filtered out if they belong to a billing tier the customer has not configured.
Parameters
NameDescription
nameString

Required. The name of the effective settings to retrieve. Formats:

  • organizations/{organization}/effectiveSettings
  • folders/{folder}/effectiveSettings
  • projects/{project}/effectiveSettings
  • projects/{project}/locations/{location}/clusters/{cluster}/effectiveSettings
  • projects/{project}/regions/{region}/clusters/{cluster}/effectiveSettings
  • projects/{project}/zones/{zone}/clusters/{cluster}/effectiveSettings
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Settings

The RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = SecurityCenterSettingsServiceClient.Create();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/settings";
// Make the request
Settings response = securityCenterSettingsServiceClient.CalculateEffectiveSettings(name);

CalculateEffectiveSettingsAsync(CalculateEffectiveSettingsRequest, CallSettings)

public virtual Task<Settings> CalculateEffectiveSettingsAsync(CalculateEffectiveSettingsRequest request, CallSettings callSettings = null)

CalculateEffectiveSettings looks up all of the Security Center Settings resources in the GCP resource hierarchy, and calculates the effective settings on that resource by applying the following rules:

  • Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings).
  • Product defaults can be overridden at org, folder, project, and cluster levels.
  • Detectors will be filtered out if they belong to a billing tier the customer has not configured.
Parameters
NameDescription
requestCalculateEffectiveSettingsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Settings>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
CalculateEffectiveSettingsRequest request = new CalculateEffectiveSettingsRequest
{
    SettingsName = SettingsName.FromOrganization("[ORGANIZATION]"),
};
// Make the request
Settings response = await securityCenterSettingsServiceClient.CalculateEffectiveSettingsAsync(request);

CalculateEffectiveSettingsAsync(CalculateEffectiveSettingsRequest, CancellationToken)

public virtual Task<Settings> CalculateEffectiveSettingsAsync(CalculateEffectiveSettingsRequest request, CancellationToken cancellationToken)

CalculateEffectiveSettings looks up all of the Security Center Settings resources in the GCP resource hierarchy, and calculates the effective settings on that resource by applying the following rules:

  • Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings).
  • Product defaults can be overridden at org, folder, project, and cluster levels.
  • Detectors will be filtered out if they belong to a billing tier the customer has not configured.
Parameters
NameDescription
requestCalculateEffectiveSettingsRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Settings>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
CalculateEffectiveSettingsRequest request = new CalculateEffectiveSettingsRequest
{
    SettingsName = SettingsName.FromOrganization("[ORGANIZATION]"),
};
// Make the request
Settings response = await securityCenterSettingsServiceClient.CalculateEffectiveSettingsAsync(request);

CalculateEffectiveSettingsAsync(SettingsName, CallSettings)

public virtual Task<Settings> CalculateEffectiveSettingsAsync(SettingsName name, CallSettings callSettings = null)

CalculateEffectiveSettings looks up all of the Security Center Settings resources in the GCP resource hierarchy, and calculates the effective settings on that resource by applying the following rules:

  • Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings).
  • Product defaults can be overridden at org, folder, project, and cluster levels.
  • Detectors will be filtered out if they belong to a billing tier the customer has not configured.
Parameters
NameDescription
nameSettingsName

Required. The name of the effective settings to retrieve. Formats:

  • organizations/{organization}/effectiveSettings
  • folders/{folder}/effectiveSettings
  • projects/{project}/effectiveSettings
  • projects/{project}/locations/{location}/clusters/{cluster}/effectiveSettings
  • projects/{project}/regions/{region}/clusters/{cluster}/effectiveSettings
  • projects/{project}/zones/{zone}/clusters/{cluster}/effectiveSettings
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Settings>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
SettingsName name = SettingsName.FromOrganization("[ORGANIZATION]");
// Make the request
Settings response = await securityCenterSettingsServiceClient.CalculateEffectiveSettingsAsync(name);

CalculateEffectiveSettingsAsync(SettingsName, CancellationToken)

public virtual Task<Settings> CalculateEffectiveSettingsAsync(SettingsName name, CancellationToken cancellationToken)

CalculateEffectiveSettings looks up all of the Security Center Settings resources in the GCP resource hierarchy, and calculates the effective settings on that resource by applying the following rules:

  • Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings).
  • Product defaults can be overridden at org, folder, project, and cluster levels.
  • Detectors will be filtered out if they belong to a billing tier the customer has not configured.
Parameters
NameDescription
nameSettingsName

Required. The name of the effective settings to retrieve. Formats:

  • organizations/{organization}/effectiveSettings
  • folders/{folder}/effectiveSettings
  • projects/{project}/effectiveSettings
  • projects/{project}/locations/{location}/clusters/{cluster}/effectiveSettings
  • projects/{project}/regions/{region}/clusters/{cluster}/effectiveSettings
  • projects/{project}/zones/{zone}/clusters/{cluster}/effectiveSettings
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Settings>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
SettingsName name = SettingsName.FromOrganization("[ORGANIZATION]");
// Make the request
Settings response = await securityCenterSettingsServiceClient.CalculateEffectiveSettingsAsync(name);

CalculateEffectiveSettingsAsync(String, CallSettings)

public virtual Task<Settings> CalculateEffectiveSettingsAsync(string name, CallSettings callSettings = null)

CalculateEffectiveSettings looks up all of the Security Center Settings resources in the GCP resource hierarchy, and calculates the effective settings on that resource by applying the following rules:

  • Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings).
  • Product defaults can be overridden at org, folder, project, and cluster levels.
  • Detectors will be filtered out if they belong to a billing tier the customer has not configured.
Parameters
NameDescription
nameString

Required. The name of the effective settings to retrieve. Formats:

  • organizations/{organization}/effectiveSettings
  • folders/{folder}/effectiveSettings
  • projects/{project}/effectiveSettings
  • projects/{project}/locations/{location}/clusters/{cluster}/effectiveSettings
  • projects/{project}/regions/{region}/clusters/{cluster}/effectiveSettings
  • projects/{project}/zones/{zone}/clusters/{cluster}/effectiveSettings
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Settings>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/settings";
// Make the request
Settings response = await securityCenterSettingsServiceClient.CalculateEffectiveSettingsAsync(name);

CalculateEffectiveSettingsAsync(String, CancellationToken)

public virtual Task<Settings> CalculateEffectiveSettingsAsync(string name, CancellationToken cancellationToken)

CalculateEffectiveSettings looks up all of the Security Center Settings resources in the GCP resource hierarchy, and calculates the effective settings on that resource by applying the following rules:

  • Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings).
  • Product defaults can be overridden at org, folder, project, and cluster levels.
  • Detectors will be filtered out if they belong to a billing tier the customer has not configured.
Parameters
NameDescription
nameString

Required. The name of the effective settings to retrieve. Formats:

  • organizations/{organization}/effectiveSettings
  • folders/{folder}/effectiveSettings
  • projects/{project}/effectiveSettings
  • projects/{project}/locations/{location}/clusters/{cluster}/effectiveSettings
  • projects/{project}/regions/{region}/clusters/{cluster}/effectiveSettings
  • projects/{project}/zones/{zone}/clusters/{cluster}/effectiveSettings
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Settings>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/settings";
// Make the request
Settings response = await securityCenterSettingsServiceClient.CalculateEffectiveSettingsAsync(name);

Create()

public static SecurityCenterSettingsServiceClient Create()

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

Returns
TypeDescription
SecurityCenterSettingsServiceClient

The created SecurityCenterSettingsServiceClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<SecurityCenterSettingsServiceClient>

The task representing the created SecurityCenterSettingsServiceClient.

GetComponentSettings(ComponentSettingsName, CallSettings)

public virtual ComponentSettings GetComponentSettings(ComponentSettingsName name, CallSettings callSettings = null)

Gets the Component Settings.

Parameters
NameDescription
nameComponentSettingsName

Required. The component settings to retrieve.

Formats:

  • organizations/{organization}/components/{component}/settings
  • folders/{folder}/components/{component}/settings
  • projects/{project}/components/{component}/settings
  • projects/{project}/locations/{location}/clusters/{cluster}/components/{component}/settings
  • projects/{project}/regions/{region}/clusters/{cluster}/components/{component}/settings
  • projects/{project}/zones/{zone}/clusters/{cluster}/components/{component}/settings
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ComponentSettings

The RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = SecurityCenterSettingsServiceClient.Create();
// Initialize request argument(s)
ComponentSettingsName name = ComponentSettingsName.FromOrganizationComponent("[ORGANIZATION]", "[COMPONENT]");
// Make the request
ComponentSettings response = securityCenterSettingsServiceClient.GetComponentSettings(name);

GetComponentSettings(GetComponentSettingsRequest, CallSettings)

public virtual ComponentSettings GetComponentSettings(GetComponentSettingsRequest request, CallSettings callSettings = null)

Gets the Component Settings.

Parameters
NameDescription
requestGetComponentSettingsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ComponentSettings

The RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = SecurityCenterSettingsServiceClient.Create();
// Initialize request argument(s)
GetComponentSettingsRequest request = new GetComponentSettingsRequest
{
    ComponentSettingsName = ComponentSettingsName.FromOrganizationComponent("[ORGANIZATION]", "[COMPONENT]"),
};
// Make the request
ComponentSettings response = securityCenterSettingsServiceClient.GetComponentSettings(request);

GetComponentSettings(String, CallSettings)

public virtual ComponentSettings GetComponentSettings(string name, CallSettings callSettings = null)

Gets the Component Settings.

Parameters
NameDescription
nameString

Required. The component settings to retrieve.

Formats:

  • organizations/{organization}/components/{component}/settings
  • folders/{folder}/components/{component}/settings
  • projects/{project}/components/{component}/settings
  • projects/{project}/locations/{location}/clusters/{cluster}/components/{component}/settings
  • projects/{project}/regions/{region}/clusters/{cluster}/components/{component}/settings
  • projects/{project}/zones/{zone}/clusters/{cluster}/components/{component}/settings
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ComponentSettings

The RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = SecurityCenterSettingsServiceClient.Create();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/components/[COMPONENT]/settings";
// Make the request
ComponentSettings response = securityCenterSettingsServiceClient.GetComponentSettings(name);

GetComponentSettingsAsync(ComponentSettingsName, CallSettings)

public virtual Task<ComponentSettings> GetComponentSettingsAsync(ComponentSettingsName name, CallSettings callSettings = null)

Gets the Component Settings.

Parameters
NameDescription
nameComponentSettingsName

Required. The component settings to retrieve.

Formats:

  • organizations/{organization}/components/{component}/settings
  • folders/{folder}/components/{component}/settings
  • projects/{project}/components/{component}/settings
  • projects/{project}/locations/{location}/clusters/{cluster}/components/{component}/settings
  • projects/{project}/regions/{region}/clusters/{cluster}/components/{component}/settings
  • projects/{project}/zones/{zone}/clusters/{cluster}/components/{component}/settings
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ComponentSettings>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
ComponentSettingsName name = ComponentSettingsName.FromOrganizationComponent("[ORGANIZATION]", "[COMPONENT]");
// Make the request
ComponentSettings response = await securityCenterSettingsServiceClient.GetComponentSettingsAsync(name);

GetComponentSettingsAsync(ComponentSettingsName, CancellationToken)

public virtual Task<ComponentSettings> GetComponentSettingsAsync(ComponentSettingsName name, CancellationToken cancellationToken)

Gets the Component Settings.

Parameters
NameDescription
nameComponentSettingsName

Required. The component settings to retrieve.

Formats:

  • organizations/{organization}/components/{component}/settings
  • folders/{folder}/components/{component}/settings
  • projects/{project}/components/{component}/settings
  • projects/{project}/locations/{location}/clusters/{cluster}/components/{component}/settings
  • projects/{project}/regions/{region}/clusters/{cluster}/components/{component}/settings
  • projects/{project}/zones/{zone}/clusters/{cluster}/components/{component}/settings
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ComponentSettings>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
ComponentSettingsName name = ComponentSettingsName.FromOrganizationComponent("[ORGANIZATION]", "[COMPONENT]");
// Make the request
ComponentSettings response = await securityCenterSettingsServiceClient.GetComponentSettingsAsync(name);

GetComponentSettingsAsync(GetComponentSettingsRequest, CallSettings)

public virtual Task<ComponentSettings> GetComponentSettingsAsync(GetComponentSettingsRequest request, CallSettings callSettings = null)

Gets the Component Settings.

Parameters
NameDescription
requestGetComponentSettingsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ComponentSettings>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
GetComponentSettingsRequest request = new GetComponentSettingsRequest
{
    ComponentSettingsName = ComponentSettingsName.FromOrganizationComponent("[ORGANIZATION]", "[COMPONENT]"),
};
// Make the request
ComponentSettings response = await securityCenterSettingsServiceClient.GetComponentSettingsAsync(request);

GetComponentSettingsAsync(GetComponentSettingsRequest, CancellationToken)

public virtual Task<ComponentSettings> GetComponentSettingsAsync(GetComponentSettingsRequest request, CancellationToken cancellationToken)

Gets the Component Settings.

Parameters
NameDescription
requestGetComponentSettingsRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ComponentSettings>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
GetComponentSettingsRequest request = new GetComponentSettingsRequest
{
    ComponentSettingsName = ComponentSettingsName.FromOrganizationComponent("[ORGANIZATION]", "[COMPONENT]"),
};
// Make the request
ComponentSettings response = await securityCenterSettingsServiceClient.GetComponentSettingsAsync(request);

GetComponentSettingsAsync(String, CallSettings)

public virtual Task<ComponentSettings> GetComponentSettingsAsync(string name, CallSettings callSettings = null)

Gets the Component Settings.

Parameters
NameDescription
nameString

Required. The component settings to retrieve.

Formats:

  • organizations/{organization}/components/{component}/settings
  • folders/{folder}/components/{component}/settings
  • projects/{project}/components/{component}/settings
  • projects/{project}/locations/{location}/clusters/{cluster}/components/{component}/settings
  • projects/{project}/regions/{region}/clusters/{cluster}/components/{component}/settings
  • projects/{project}/zones/{zone}/clusters/{cluster}/components/{component}/settings
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ComponentSettings>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/components/[COMPONENT]/settings";
// Make the request
ComponentSettings response = await securityCenterSettingsServiceClient.GetComponentSettingsAsync(name);

GetComponentSettingsAsync(String, CancellationToken)

public virtual Task<ComponentSettings> GetComponentSettingsAsync(string name, CancellationToken cancellationToken)

Gets the Component Settings.

Parameters
NameDescription
nameString

Required. The component settings to retrieve.

Formats:

  • organizations/{organization}/components/{component}/settings
  • folders/{folder}/components/{component}/settings
  • projects/{project}/components/{component}/settings
  • projects/{project}/locations/{location}/clusters/{cluster}/components/{component}/settings
  • projects/{project}/regions/{region}/clusters/{cluster}/components/{component}/settings
  • projects/{project}/zones/{zone}/clusters/{cluster}/components/{component}/settings
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ComponentSettings>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/components/[COMPONENT]/settings";
// Make the request
ComponentSettings response = await securityCenterSettingsServiceClient.GetComponentSettingsAsync(name);

GetServiceAccount(GetServiceAccountRequest, CallSettings)

public virtual ServiceAccount GetServiceAccount(GetServiceAccountRequest request, CallSettings callSettings = null)

Retrieves the organizations service account, if it exists, otherwise it creates the organization service account. This API is idempotent and will only create a service account once. On subsequent calls it will return the previously created service account. SHA, SCC and CTD Infra Automation will use this SA. This SA will not have any permissions when created. The UI will provision this via IAM or the user will using their own internal process. This API only creates SAs on the organization. Folders are not supported and projects will use per-project SAs associated with APIs enabled on a project. This API will be called by the UX onboarding workflow.

Parameters
NameDescription
requestGetServiceAccountRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ServiceAccount

The RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = SecurityCenterSettingsServiceClient.Create();
// Initialize request argument(s)
GetServiceAccountRequest request = new GetServiceAccountRequest
{
    ServiceAccountName = ServiceAccountName.FromOrganization("[ORGANIZATION]"),
};
// Make the request
ServiceAccount response = securityCenterSettingsServiceClient.GetServiceAccount(request);

GetServiceAccount(ServiceAccountName, CallSettings)

public virtual ServiceAccount GetServiceAccount(ServiceAccountName name, CallSettings callSettings = null)

Retrieves the organizations service account, if it exists, otherwise it creates the organization service account. This API is idempotent and will only create a service account once. On subsequent calls it will return the previously created service account. SHA, SCC and CTD Infra Automation will use this SA. This SA will not have any permissions when created. The UI will provision this via IAM or the user will using their own internal process. This API only creates SAs on the organization. Folders are not supported and projects will use per-project SAs associated with APIs enabled on a project. This API will be called by the UX onboarding workflow.

Parameters
NameDescription
nameServiceAccountName

Required. The relative resource name of the service account resource. Format:

  • organizations/{organization}/serviceAccount
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ServiceAccount

The RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = SecurityCenterSettingsServiceClient.Create();
// Initialize request argument(s)
ServiceAccountName name = ServiceAccountName.FromOrganization("[ORGANIZATION]");
// Make the request
ServiceAccount response = securityCenterSettingsServiceClient.GetServiceAccount(name);

GetServiceAccount(String, CallSettings)

public virtual ServiceAccount GetServiceAccount(string name, CallSettings callSettings = null)

Retrieves the organizations service account, if it exists, otherwise it creates the organization service account. This API is idempotent and will only create a service account once. On subsequent calls it will return the previously created service account. SHA, SCC and CTD Infra Automation will use this SA. This SA will not have any permissions when created. The UI will provision this via IAM or the user will using their own internal process. This API only creates SAs on the organization. Folders are not supported and projects will use per-project SAs associated with APIs enabled on a project. This API will be called by the UX onboarding workflow.

Parameters
NameDescription
nameString

Required. The relative resource name of the service account resource. Format:

  • organizations/{organization}/serviceAccount
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ServiceAccount

The RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = SecurityCenterSettingsServiceClient.Create();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/serviceAccount";
// Make the request
ServiceAccount response = securityCenterSettingsServiceClient.GetServiceAccount(name);

GetServiceAccountAsync(GetServiceAccountRequest, CallSettings)

public virtual Task<ServiceAccount> GetServiceAccountAsync(GetServiceAccountRequest request, CallSettings callSettings = null)

Retrieves the organizations service account, if it exists, otherwise it creates the organization service account. This API is idempotent and will only create a service account once. On subsequent calls it will return the previously created service account. SHA, SCC and CTD Infra Automation will use this SA. This SA will not have any permissions when created. The UI will provision this via IAM or the user will using their own internal process. This API only creates SAs on the organization. Folders are not supported and projects will use per-project SAs associated with APIs enabled on a project. This API will be called by the UX onboarding workflow.

Parameters
NameDescription
requestGetServiceAccountRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ServiceAccount>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
GetServiceAccountRequest request = new GetServiceAccountRequest
{
    ServiceAccountName = ServiceAccountName.FromOrganization("[ORGANIZATION]"),
};
// Make the request
ServiceAccount response = await securityCenterSettingsServiceClient.GetServiceAccountAsync(request);

GetServiceAccountAsync(GetServiceAccountRequest, CancellationToken)

public virtual Task<ServiceAccount> GetServiceAccountAsync(GetServiceAccountRequest request, CancellationToken cancellationToken)

Retrieves the organizations service account, if it exists, otherwise it creates the organization service account. This API is idempotent and will only create a service account once. On subsequent calls it will return the previously created service account. SHA, SCC and CTD Infra Automation will use this SA. This SA will not have any permissions when created. The UI will provision this via IAM or the user will using their own internal process. This API only creates SAs on the organization. Folders are not supported and projects will use per-project SAs associated with APIs enabled on a project. This API will be called by the UX onboarding workflow.

Parameters
NameDescription
requestGetServiceAccountRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ServiceAccount>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
GetServiceAccountRequest request = new GetServiceAccountRequest
{
    ServiceAccountName = ServiceAccountName.FromOrganization("[ORGANIZATION]"),
};
// Make the request
ServiceAccount response = await securityCenterSettingsServiceClient.GetServiceAccountAsync(request);

GetServiceAccountAsync(ServiceAccountName, CallSettings)

public virtual Task<ServiceAccount> GetServiceAccountAsync(ServiceAccountName name, CallSettings callSettings = null)

Retrieves the organizations service account, if it exists, otherwise it creates the organization service account. This API is idempotent and will only create a service account once. On subsequent calls it will return the previously created service account. SHA, SCC and CTD Infra Automation will use this SA. This SA will not have any permissions when created. The UI will provision this via IAM or the user will using their own internal process. This API only creates SAs on the organization. Folders are not supported and projects will use per-project SAs associated with APIs enabled on a project. This API will be called by the UX onboarding workflow.

Parameters
NameDescription
nameServiceAccountName

Required. The relative resource name of the service account resource. Format:

  • organizations/{organization}/serviceAccount
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ServiceAccount>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
ServiceAccountName name = ServiceAccountName.FromOrganization("[ORGANIZATION]");
// Make the request
ServiceAccount response = await securityCenterSettingsServiceClient.GetServiceAccountAsync(name);

GetServiceAccountAsync(ServiceAccountName, CancellationToken)

public virtual Task<ServiceAccount> GetServiceAccountAsync(ServiceAccountName name, CancellationToken cancellationToken)

Retrieves the organizations service account, if it exists, otherwise it creates the organization service account. This API is idempotent and will only create a service account once. On subsequent calls it will return the previously created service account. SHA, SCC and CTD Infra Automation will use this SA. This SA will not have any permissions when created. The UI will provision this via IAM or the user will using their own internal process. This API only creates SAs on the organization. Folders are not supported and projects will use per-project SAs associated with APIs enabled on a project. This API will be called by the UX onboarding workflow.

Parameters
NameDescription
nameServiceAccountName

Required. The relative resource name of the service account resource. Format:

  • organizations/{organization}/serviceAccount
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ServiceAccount>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
ServiceAccountName name = ServiceAccountName.FromOrganization("[ORGANIZATION]");
// Make the request
ServiceAccount response = await securityCenterSettingsServiceClient.GetServiceAccountAsync(name);

GetServiceAccountAsync(String, CallSettings)

public virtual Task<ServiceAccount> GetServiceAccountAsync(string name, CallSettings callSettings = null)

Retrieves the organizations service account, if it exists, otherwise it creates the organization service account. This API is idempotent and will only create a service account once. On subsequent calls it will return the previously created service account. SHA, SCC and CTD Infra Automation will use this SA. This SA will not have any permissions when created. The UI will provision this via IAM or the user will using their own internal process. This API only creates SAs on the organization. Folders are not supported and projects will use per-project SAs associated with APIs enabled on a project. This API will be called by the UX onboarding workflow.

Parameters
NameDescription
nameString

Required. The relative resource name of the service account resource. Format:

  • organizations/{organization}/serviceAccount
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ServiceAccount>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/serviceAccount";
// Make the request
ServiceAccount response = await securityCenterSettingsServiceClient.GetServiceAccountAsync(name);

GetServiceAccountAsync(String, CancellationToken)

public virtual Task<ServiceAccount> GetServiceAccountAsync(string name, CancellationToken cancellationToken)

Retrieves the organizations service account, if it exists, otherwise it creates the organization service account. This API is idempotent and will only create a service account once. On subsequent calls it will return the previously created service account. SHA, SCC and CTD Infra Automation will use this SA. This SA will not have any permissions when created. The UI will provision this via IAM or the user will using their own internal process. This API only creates SAs on the organization. Folders are not supported and projects will use per-project SAs associated with APIs enabled on a project. This API will be called by the UX onboarding workflow.

Parameters
NameDescription
nameString

Required. The relative resource name of the service account resource. Format:

  • organizations/{organization}/serviceAccount
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ServiceAccount>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/serviceAccount";
// Make the request
ServiceAccount response = await securityCenterSettingsServiceClient.GetServiceAccountAsync(name);

GetSettings(GetSettingsRequest, CallSettings)

public virtual Settings GetSettings(GetSettingsRequest request, CallSettings callSettings = null)

Gets the Settings.

Parameters
NameDescription
requestGetSettingsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Settings

The RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = SecurityCenterSettingsServiceClient.Create();
// Initialize request argument(s)
GetSettingsRequest request = new GetSettingsRequest
{
    SettingsName = SettingsName.FromOrganization("[ORGANIZATION]"),
};
// Make the request
Settings response = securityCenterSettingsServiceClient.GetSettings(request);

GetSettings(SettingsName, CallSettings)

public virtual Settings GetSettings(SettingsName name, CallSettings callSettings = null)

Gets the Settings.

Parameters
NameDescription
nameSettingsName

Required. The name of the settings to retrieve. Formats:

  • organizations/{organization}/settings
  • folders/{folder}/settings
  • projects/{project}/settings
  • projects/{project}/locations/{location}/clusters/{cluster}/settings
  • projects/{project}/regions/{region}/clusters/{cluster}/settings
  • projects/{project}/zones/{zone}/clusters/{cluster}/settings
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Settings

The RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = SecurityCenterSettingsServiceClient.Create();
// Initialize request argument(s)
SettingsName name = SettingsName.FromOrganization("[ORGANIZATION]");
// Make the request
Settings response = securityCenterSettingsServiceClient.GetSettings(name);

GetSettings(String, CallSettings)

public virtual Settings GetSettings(string name, CallSettings callSettings = null)

Gets the Settings.

Parameters
NameDescription
nameString

Required. The name of the settings to retrieve. Formats:

  • organizations/{organization}/settings
  • folders/{folder}/settings
  • projects/{project}/settings
  • projects/{project}/locations/{location}/clusters/{cluster}/settings
  • projects/{project}/regions/{region}/clusters/{cluster}/settings
  • projects/{project}/zones/{zone}/clusters/{cluster}/settings
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Settings

The RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = SecurityCenterSettingsServiceClient.Create();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/settings";
// Make the request
Settings response = securityCenterSettingsServiceClient.GetSettings(name);

GetSettingsAsync(GetSettingsRequest, CallSettings)

public virtual Task<Settings> GetSettingsAsync(GetSettingsRequest request, CallSettings callSettings = null)

Gets the Settings.

Parameters
NameDescription
requestGetSettingsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Settings>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
GetSettingsRequest request = new GetSettingsRequest
{
    SettingsName = SettingsName.FromOrganization("[ORGANIZATION]"),
};
// Make the request
Settings response = await securityCenterSettingsServiceClient.GetSettingsAsync(request);

GetSettingsAsync(GetSettingsRequest, CancellationToken)

public virtual Task<Settings> GetSettingsAsync(GetSettingsRequest request, CancellationToken cancellationToken)

Gets the Settings.

Parameters
NameDescription
requestGetSettingsRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Settings>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
GetSettingsRequest request = new GetSettingsRequest
{
    SettingsName = SettingsName.FromOrganization("[ORGANIZATION]"),
};
// Make the request
Settings response = await securityCenterSettingsServiceClient.GetSettingsAsync(request);

GetSettingsAsync(SettingsName, CallSettings)

public virtual Task<Settings> GetSettingsAsync(SettingsName name, CallSettings callSettings = null)

Gets the Settings.

Parameters
NameDescription
nameSettingsName

Required. The name of the settings to retrieve. Formats:

  • organizations/{organization}/settings
  • folders/{folder}/settings
  • projects/{project}/settings
  • projects/{project}/locations/{location}/clusters/{cluster}/settings
  • projects/{project}/regions/{region}/clusters/{cluster}/settings
  • projects/{project}/zones/{zone}/clusters/{cluster}/settings
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Settings>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
SettingsName name = SettingsName.FromOrganization("[ORGANIZATION]");
// Make the request
Settings response = await securityCenterSettingsServiceClient.GetSettingsAsync(name);

GetSettingsAsync(SettingsName, CancellationToken)

public virtual Task<Settings> GetSettingsAsync(SettingsName name, CancellationToken cancellationToken)

Gets the Settings.

Parameters
NameDescription
nameSettingsName

Required. The name of the settings to retrieve. Formats:

  • organizations/{organization}/settings
  • folders/{folder}/settings
  • projects/{project}/settings
  • projects/{project}/locations/{location}/clusters/{cluster}/settings
  • projects/{project}/regions/{region}/clusters/{cluster}/settings
  • projects/{project}/zones/{zone}/clusters/{cluster}/settings
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Settings>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
SettingsName name = SettingsName.FromOrganization("[ORGANIZATION]");
// Make the request
Settings response = await securityCenterSettingsServiceClient.GetSettingsAsync(name);

GetSettingsAsync(String, CallSettings)

public virtual Task<Settings> GetSettingsAsync(string name, CallSettings callSettings = null)

Gets the Settings.

Parameters
NameDescription
nameString

Required. The name of the settings to retrieve. Formats:

  • organizations/{organization}/settings
  • folders/{folder}/settings
  • projects/{project}/settings
  • projects/{project}/locations/{location}/clusters/{cluster}/settings
  • projects/{project}/regions/{region}/clusters/{cluster}/settings
  • projects/{project}/zones/{zone}/clusters/{cluster}/settings
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Settings>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/settings";
// Make the request
Settings response = await securityCenterSettingsServiceClient.GetSettingsAsync(name);

GetSettingsAsync(String, CancellationToken)

public virtual Task<Settings> GetSettingsAsync(string name, CancellationToken cancellationToken)

Gets the Settings.

Parameters
NameDescription
nameString

Required. The name of the settings to retrieve. Formats:

  • organizations/{organization}/settings
  • folders/{folder}/settings
  • projects/{project}/settings
  • projects/{project}/locations/{location}/clusters/{cluster}/settings
  • projects/{project}/regions/{region}/clusters/{cluster}/settings
  • projects/{project}/zones/{zone}/clusters/{cluster}/settings
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Settings>

A Task containing the RPC response.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/settings";
// Make the request
Settings response = await securityCenterSettingsServiceClient.GetSettingsAsync(name);

ListComponents(OrganizationName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListComponentsResponse, string> ListComponents(OrganizationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves an unordered list of available SCC components.

Parameters
NameDescription
parentOrganizationName

Required. The parent, which owns this collection of components. Format:

  • organizations/{organization}
pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListComponentsResponse, String>

A pageable sequence of String resources.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = SecurityCenterSettingsServiceClient.Create();
// Initialize request argument(s)
OrganizationName parent = OrganizationName.FromOrganization("[ORGANIZATION]");
// Make the request
PagedEnumerable<ListComponentsResponse, string> response = securityCenterSettingsServiceClient.ListComponents(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (string 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 (ListComponentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (string 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<string> 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 (string 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;

ListComponents(ListComponentsRequest, CallSettings)

public virtual PagedEnumerable<ListComponentsResponse, string> ListComponents(ListComponentsRequest request, CallSettings callSettings = null)

Retrieves an unordered list of available SCC components.

Parameters
NameDescription
requestListComponentsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListComponentsResponse, String>

A pageable sequence of String resources.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = SecurityCenterSettingsServiceClient.Create();
// Initialize request argument(s)
ListComponentsRequest request = new ListComponentsRequest
{
    ParentAsOrganizationName = OrganizationName.FromOrganization("[ORGANIZATION]"),
};
// Make the request
PagedEnumerable<ListComponentsResponse, string> response = securityCenterSettingsServiceClient.ListComponents(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (string 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 (ListComponentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (string 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<string> 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 (string 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;

ListComponents(String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListComponentsResponse, string> ListComponents(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves an unordered list of available SCC components.

Parameters
NameDescription
parentString

Required. The parent, which owns this collection of components. Format:

  • organizations/{organization}
pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListComponentsResponse, String>

A pageable sequence of String resources.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = SecurityCenterSettingsServiceClient.Create();
// Initialize request argument(s)
string parent = "organizations/[ORGANIZATION]";
// Make the request
PagedEnumerable<ListComponentsResponse, string> response = securityCenterSettingsServiceClient.ListComponents(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (string 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 (ListComponentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (string 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<string> 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 (string 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;

ListComponentsAsync(OrganizationName, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListComponentsResponse, string> ListComponentsAsync(OrganizationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves an unordered list of available SCC components.

Parameters
NameDescription
parentOrganizationName

Required. The parent, which owns this collection of components. Format:

  • organizations/{organization}
pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListComponentsResponse, String>

A pageable asynchronous sequence of String resources.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationName parent = OrganizationName.FromOrganization("[ORGANIZATION]");
// Make the request
PagedAsyncEnumerable<ListComponentsResponse, string> response = securityCenterSettingsServiceClient.ListComponentsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((string item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListComponentsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (string 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<string> 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 (string 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;

ListComponentsAsync(ListComponentsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListComponentsResponse, string> ListComponentsAsync(ListComponentsRequest request, CallSettings callSettings = null)

Retrieves an unordered list of available SCC components.

Parameters
NameDescription
requestListComponentsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListComponentsResponse, String>

A pageable asynchronous sequence of String resources.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
ListComponentsRequest request = new ListComponentsRequest
{
    ParentAsOrganizationName = OrganizationName.FromOrganization("[ORGANIZATION]"),
};
// Make the request
PagedAsyncEnumerable<ListComponentsResponse, string> response = securityCenterSettingsServiceClient.ListComponentsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((string item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListComponentsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (string 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<string> 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 (string 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;

ListComponentsAsync(String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListComponentsResponse, string> ListComponentsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves an unordered list of available SCC components.

Parameters
NameDescription
parentString

Required. The parent, which owns this collection of components. Format:

  • organizations/{organization}
pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListComponentsResponse, String>

A pageable asynchronous sequence of String resources.

Example
// Create client
SecurityCenterSettingsServiceClient securityCenterSettingsServiceClient = await SecurityCenterSettingsServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "organizations/[ORGANIZATION]";
// Make the request
PagedAsyncEnumerable<ListComponentsResponse, string> response = securityCenterSettingsServiceClient.ListComponentsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((string item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListComponentsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (string 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<string> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} res