# Cloud Security Compliance v1 API - Class CmEnrollmentServiceClient (1.0.0-beta05)

1.0.0-beta05 (latest) 1.0.0-beta04

    public abstract class CmEnrollmentServiceClient

Reference documentation and code samples for the Cloud Security Compliance v1 API class CmEnrollmentServiceClient.

CmEnrollmentService client wrapper, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> CmEnrollmentServiceClient

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Derived Types

[CmEnrollmentServiceClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClientImpl)

## Namespace

[Google.Cloud.CloudSecurityCompliance.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1)

## Assembly

Google.Cloud.CloudSecurityCompliance.V1.dll

## Remarks

Service describing CmEnrollment related RPCs for
complianceManager.

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default CmEnrollmentService scopes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1https://learn.microsoft.com/dotnet/api/system.string` |   |

**Remarks** The default CmEnrollmentService scopes are:

- <https://www.googleapis.com/auth/cloud-platform>

### GrpcClient

    public virtual CmEnrollmentService.CmEnrollmentServiceClient GrpcClient { get; }

The underlying gRPC CmEnrollmentService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentService.CmEnrollmentServiceClient` |   |

### LocationsClient

    public virtual LocationsClient LocationsClient { get; }

The [LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html) associated with this client.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ServiceMetadata.html` |   |

## Methods

### CalculateEffectiveCmEnrollment(CalculateEffectiveCmEnrollmentRequest, CallSettings)

    public virtual CalculateEffectiveCmEnrollmentResponse CalculateEffectiveCmEnrollment(CalculateEffectiveCmEnrollmentRequest request, CallSettings callSettings = null)

Calculates the effective Compliance Manager enrollment for a resource.
An effective enrollment is either a direct enrollment of a
resource (if it exists), or an enrollment of the closest parent of a
resource that's enrolled in Compliance Manager.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CalculateEffectiveCmEnrollmentRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CalculateEffectiveCmEnrollmentResponse` | The RPC response. |

**Example**

    // Create client
    CmEnrollmentServiceClient cmEnrollmentServiceClient = CmEnrollmentServiceClient.Create();
    // Initialize request argument(s)
    CalculateEffectiveCmEnrollmentRequest request = new CalculateEffectiveCmEnrollmentRequest
    {
        CmEnrollmentName = CmEnrollmentName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"),
    };
    // Make the request
    CalculateEffectiveCmEnrollmentResponse response = cmEnrollmentServiceClient.CalculateEffectiveCmEnrollment(request);

### CalculateEffectiveCmEnrollment(CmEnrollmentName, CallSettings)

    public virtual CalculateEffectiveCmEnrollmentResponse CalculateEffectiveCmEnrollment(CmEnrollmentName name, CallSettings callSettings = null)

Calculates the effective Compliance Manager enrollment for a resource.
An effective enrollment is either a direct enrollment of a
resource (if it exists), or an enrollment of the closest parent of a
resource that's enrolled in Compliance Manager.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentName` Required. The name of the Compliance Manager enrollment to calculate. Supported formats are the following: - `organizations/{organization_id}/locations/{location}/cmEnrollment` - `folders/{folder_id}/locations/{location}/cmEnrollment` - `projects/{project_id}/locations/{location}/cmEnrollment` |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CalculateEffectiveCmEnrollmentResponse` | The RPC response. |

**Example**

    // Create client
    CmEnrollmentServiceClient cmEnrollmentServiceClient = CmEnrollmentServiceClient.Create();
    // Initialize request argument(s)
    CmEnrollmentName name = CmEnrollmentName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
    // Make the request
    CalculateEffectiveCmEnrollmentResponse response = cmEnrollmentServiceClient.CalculateEffectiveCmEnrollment(name);

### CalculateEffectiveCmEnrollment(string, CallSettings)

    public virtual CalculateEffectiveCmEnrollmentResponse CalculateEffectiveCmEnrollment(string name, CallSettings callSettings = null)

Calculates the effective Compliance Manager enrollment for a resource.
An effective enrollment is either a direct enrollment of a
resource (if it exists), or an enrollment of the closest parent of a
resource that's enrolled in Compliance Manager.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the Compliance Manager enrollment to calculate. Supported formats are the following: - `organizations/{organization_id}/locations/{location}/cmEnrollment` - `folders/{folder_id}/locations/{location}/cmEnrollment` - `projects/{project_id}/locations/{location}/cmEnrollment` |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CalculateEffectiveCmEnrollmentResponse` | The RPC response. |

**Example**

    // Create client
    CmEnrollmentServiceClient cmEnrollmentServiceClient = CmEnrollmentServiceClient.Create();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/cmEnrollment";
    // Make the request
    CalculateEffectiveCmEnrollmentResponse response = cmEnrollmentServiceClient.CalculateEffectiveCmEnrollment(name);

### CalculateEffectiveCmEnrollmentAsync(CalculateEffectiveCmEnrollmentRequest, CallSettings)

    public virtual Task<CalculateEffectiveCmEnrollmentResponse> CalculateEffectiveCmEnrollmentAsync(CalculateEffectiveCmEnrollmentRequest request, CallSettings callSettings = null)

Calculates the effective Compliance Manager enrollment for a resource.
An effective enrollment is either a direct enrollment of a
resource (if it exists), or an enrollment of the closest parent of a
resource that's enrolled in Compliance Manager.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CalculateEffectiveCmEnrollmentRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CalculateEffectiveCmEnrollmentResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    CmEnrollmentServiceClient cmEnrollmentServiceClient = await CmEnrollmentServiceClient.CreateAsync();
    // Initialize request argument(s)
    CalculateEffectiveCmEnrollmentRequest request = new CalculateEffectiveCmEnrollmentRequest
    {
        CmEnrollmentName = CmEnrollmentName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"),
    };
    // Make the request
    CalculateEffectiveCmEnrollmentResponse response = await cmEnrollmentServiceClient.CalculateEffectiveCmEnrollmentAsync(request);

### CalculateEffectiveCmEnrollmentAsync(CalculateEffectiveCmEnrollmentRequest, CancellationToken)

    public virtual Task<CalculateEffectiveCmEnrollmentResponse> CalculateEffectiveCmEnrollmentAsync(CalculateEffectiveCmEnrollmentRequest request, CancellationToken cancellationToken)

Calculates the effective Compliance Manager enrollment for a resource.
An effective enrollment is either a direct enrollment of a
resource (if it exists), or an enrollment of the closest parent of a
resource that's enrolled in Compliance Manager.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CalculateEffectiveCmEnrollmentRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CalculateEffectiveCmEnrollmentResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    CmEnrollmentServiceClient cmEnrollmentServiceClient = await CmEnrollmentServiceClient.CreateAsync();
    // Initialize request argument(s)
    CalculateEffectiveCmEnrollmentRequest request = new CalculateEffectiveCmEnrollmentRequest
    {
        CmEnrollmentName = CmEnrollmentName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"),
    };
    // Make the request
    CalculateEffectiveCmEnrollmentResponse response = await cmEnrollmentServiceClient.CalculateEffectiveCmEnrollmentAsync(request);

### CalculateEffectiveCmEnrollmentAsync(CmEnrollmentName, CallSettings)

    public virtual Task<CalculateEffectiveCmEnrollmentResponse> CalculateEffectiveCmEnrollmentAsync(CmEnrollmentName name, CallSettings callSettings = null)

Calculates the effective Compliance Manager enrollment for a resource.
An effective enrollment is either a direct enrollment of a
resource (if it exists), or an enrollment of the closest parent of a
resource that's enrolled in Compliance Manager.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentName` Required. The name of the Compliance Manager enrollment to calculate. Supported formats are the following: - `organizations/{organization_id}/locations/{location}/cmEnrollment` - `folders/{folder_id}/locations/{location}/cmEnrollment` - `projects/{project_id}/locations/{location}/cmEnrollment` |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CalculateEffectiveCmEnrollmentResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    CmEnrollmentServiceClient cmEnrollmentServiceClient = await CmEnrollmentServiceClient.CreateAsync();
    // Initialize request argument(s)
    CmEnrollmentName name = CmEnrollmentName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
    // Make the request
    CalculateEffectiveCmEnrollmentResponse response = await cmEnrollmentServiceClient.CalculateEffectiveCmEnrollmentAsync(name);

### CalculateEffectiveCmEnrollmentAsync(CmEnrollmentName, CancellationToken)

    public virtual Task<CalculateEffectiveCmEnrollmentResponse> CalculateEffectiveCmEnrollmentAsync(CmEnrollmentName name, CancellationToken cancellationToken)

Calculates the effective Compliance Manager enrollment for a resource.
An effective enrollment is either a direct enrollment of a
resource (if it exists), or an enrollment of the closest parent of a
resource that's enrolled in Compliance Manager.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentName` Required. The name of the Compliance Manager enrollment to calculate. Supported formats are the following: - `organizations/{organization_id}/locations/{location}/cmEnrollment` - `folders/{folder_id}/locations/{location}/cmEnrollment` - `projects/{project_id}/locations/{location}/cmEnrollment` |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CalculateEffectiveCmEnrollmentResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    CmEnrollmentServiceClient cmEnrollmentServiceClient = await CmEnrollmentServiceClient.CreateAsync();
    // Initialize request argument(s)
    CmEnrollmentName name = CmEnrollmentName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
    // Make the request
    CalculateEffectiveCmEnrollmentResponse response = await cmEnrollmentServiceClient.CalculateEffectiveCmEnrollmentAsync(name);

### CalculateEffectiveCmEnrollmentAsync(string, CallSettings)

    public virtual Task<CalculateEffectiveCmEnrollmentResponse> CalculateEffectiveCmEnrollmentAsync(string name, CallSettings callSettings = null)

Calculates the effective Compliance Manager enrollment for a resource.
An effective enrollment is either a direct enrollment of a
resource (if it exists), or an enrollment of the closest parent of a
resource that's enrolled in Compliance Manager.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the Compliance Manager enrollment to calculate. Supported formats are the following: - `organizations/{organization_id}/locations/{location}/cmEnrollment` - `folders/{folder_id}/locations/{location}/cmEnrollment` - `projects/{project_id}/locations/{location}/cmEnrollment` |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CalculateEffectiveCmEnrollmentResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    CmEnrollmentServiceClient cmEnrollmentServiceClient = await CmEnrollmentServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/cmEnrollment";
    // Make the request
    CalculateEffectiveCmEnrollmentResponse response = await cmEnrollmentServiceClient.CalculateEffectiveCmEnrollmentAsync(name);

### CalculateEffectiveCmEnrollmentAsync(string, CancellationToken)

    public virtual Task<CalculateEffectiveCmEnrollmentResponse> CalculateEffectiveCmEnrollmentAsync(string name, CancellationToken cancellationToken)

Calculates the effective Compliance Manager enrollment for a resource.
An effective enrollment is either a direct enrollment of a
resource (if it exists), or an enrollment of the closest parent of a
resource that's enrolled in Compliance Manager.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the Compliance Manager enrollment to calculate. Supported formats are the following: - `organizations/{organization_id}/locations/{location}/cmEnrollment` - `folders/{folder_id}/locations/{location}/cmEnrollment` - `projects/{project_id}/locations/{location}/cmEnrollment` |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CalculateEffectiveCmEnrollmentResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    CmEnrollmentServiceClient cmEnrollmentServiceClient = await CmEnrollmentServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/cmEnrollment";
    // Make the request
    CalculateEffectiveCmEnrollmentResponse response = await cmEnrollmentServiceClient.CalculateEffectiveCmEnrollmentAsync(name);

### Create()

    public static CmEnrollmentServiceClient Create()

Synchronously creates a [CmEnrollmentServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use
[CmEnrollmentServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClientBuilder).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient` | The created [CmEnrollmentServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient). |

### CreateAsync(CancellationToken)

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

Asynchronously creates a [CmEnrollmentServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use
[CmEnrollmentServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClientBuilder).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use while creating the client. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient` | The task representing the created [CmEnrollmentServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient). |

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A task representing the asynchronous shutdown operation. |

**Remarks** After calling this method, further calls to [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.

### UpdateCmEnrollment(CmEnrollment, FieldMask, CallSettings)

    public virtual CmEnrollment UpdateCmEnrollment(CmEnrollment cmEnrollment, FieldMask updateMask, CallSettings callSettings = null)

Updates the Compliance Manager enrollment for a resource to facilitate
an audit.
Use this method to enroll a resource in Compliance Manager or to
create or update feature-specific configurations.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `cmEnrollment` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollment` Required. The Compliance Manager enrollment to update. The `name` field is used to identify the settings that you want to update. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Optional. The list of fields that you want to update. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollment` | The RPC response. |

**Example**

    // Create client
    CmEnrollmentServiceClient cmEnrollmentServiceClient = CmEnrollmentServiceClient.Create();
    // Initialize request argument(s)
    CmEnrollment cmEnrollment = new CmEnrollment();
    FieldMask updateMask = new FieldMask();
    // Make the request
    CmEnrollment response = cmEnrollmentServiceClient.UpdateCmEnrollment(cmEnrollment, updateMask);

### UpdateCmEnrollment(UpdateCmEnrollmentRequest, CallSettings)

    public virtual CmEnrollment UpdateCmEnrollment(UpdateCmEnrollmentRequest request, CallSettings callSettings = null)

Updates the Compliance Manager enrollment for a resource to facilitate
an audit.
Use this method to enroll a resource in Compliance Manager or to
create or update feature-specific configurations.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.UpdateCmEnrollmentRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollment` | The RPC response. |

**Example**

    // Create client
    CmEnrollmentServiceClient cmEnrollmentServiceClient = CmEnrollmentServiceClient.Create();
    // Initialize request argument(s)
    UpdateCmEnrollmentRequest request = new UpdateCmEnrollmentRequest
    {
        CmEnrollment = new CmEnrollment(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    CmEnrollment response = cmEnrollmentServiceClient.UpdateCmEnrollment(request);

### UpdateCmEnrollmentAsync(CmEnrollment, FieldMask, CallSettings)

    public virtual Task<CmEnrollment> UpdateCmEnrollmentAsync(CmEnrollment cmEnrollment, FieldMask updateMask, CallSettings callSettings = null)

Updates the Compliance Manager enrollment for a resource to facilitate
an audit.
Use this method to enroll a resource in Compliance Manager or to
create or update feature-specific configurations.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `cmEnrollment` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollment` Required. The Compliance Manager enrollment to update. The `name` field is used to identify the settings that you want to update. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Optional. The list of fields that you want to update. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollment` | A Task containing the RPC response. |

**Example**

    // Create client
    CmEnrollmentServiceClient cmEnrollmentServiceClient = await CmEnrollmentServiceClient.CreateAsync();
    // Initialize request argument(s)
    CmEnrollment cmEnrollment = new CmEnrollment();
    FieldMask updateMask = new FieldMask();
    // Make the request
    CmEnrollment response = await cmEnrollmentServiceClient.UpdateCmEnrollmentAsync(cmEnrollment, updateMask);

### UpdateCmEnrollmentAsync(CmEnrollment, FieldMask, CancellationToken)

    public virtual Task<CmEnrollment> UpdateCmEnrollmentAsync(CmEnrollment cmEnrollment, FieldMask updateMask, CancellationToken cancellationToken)

Updates the Compliance Manager enrollment for a resource to facilitate
an audit.
Use this method to enroll a resource in Compliance Manager or to
create or update feature-specific configurations.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `cmEnrollment` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollment` Required. The Compliance Manager enrollment to update. The `name` field is used to identify the settings that you want to update. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Optional. The list of fields that you want to update. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollment` | A Task containing the RPC response. |

**Example**

    // Create client
    CmEnrollmentServiceClient cmEnrollmentServiceClient = await CmEnrollmentServiceClient.CreateAsync();
    // Initialize request argument(s)
    CmEnrollment cmEnrollment = new CmEnrollment();
    FieldMask updateMask = new FieldMask();
    // Make the request
    CmEnrollment response = await cmEnrollmentServiceClient.UpdateCmEnrollmentAsync(cmEnrollment, updateMask);

### UpdateCmEnrollmentAsync(UpdateCmEnrollmentRequest, CallSettings)

    public virtual Task<CmEnrollment> UpdateCmEnrollmentAsync(UpdateCmEnrollmentRequest request, CallSettings callSettings = null)

Updates the Compliance Manager enrollment for a resource to facilitate
an audit.
Use this method to enroll a resource in Compliance Manager or to
create or update feature-specific configurations.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.UpdateCmEnrollmentRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollment` | A Task containing the RPC response. |

**Example**

    // Create client
    CmEnrollmentServiceClient cmEnrollmentServiceClient = await CmEnrollmentServiceClient.CreateAsync();
    // Initialize request argument(s)
    UpdateCmEnrollmentRequest request = new UpdateCmEnrollmentRequest
    {
        CmEnrollment = new CmEnrollment(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    CmEnrollment response = await cmEnrollmentServiceClient.UpdateCmEnrollmentAsync(request);

### UpdateCmEnrollmentAsync(UpdateCmEnrollmentRequest, CancellationToken)

    public virtual Task<CmEnrollment> UpdateCmEnrollmentAsync(UpdateCmEnrollmentRequest request, CancellationToken cancellationToken)

Updates the Compliance Manager enrollment for a resource to facilitate
an audit.
Use this method to enroll a resource in Compliance Manager or to
create or update feature-specific configurations.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.UpdateCmEnrollmentRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollment` | A Task containing the RPC response. |

**Example**

    // Create client
    CmEnrollmentServiceClient cmEnrollmentServiceClient = await CmEnrollmentServiceClient.CreateAsync();
    // Initialize request argument(s)
    UpdateCmEnrollmentRequest request = new UpdateCmEnrollmentRequest
    {
        CmEnrollment = new CmEnrollment(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    CmEnrollment response = await cmEnrollmentServiceClient.UpdateCmEnrollmentAsync(request);