Public Certificate Authority v1beta1 API - Class PublicCertificateAuthorityServiceClient (1.0.0-beta04)

public abstract class PublicCertificateAuthorityServiceClient

Reference documentation and code samples for the Public Certificate Authority v1beta1 API class PublicCertificateAuthorityServiceClient.

PublicCertificateAuthorityService client wrapper, for convenient use.

Inheritance

object > PublicCertificateAuthorityServiceClient

Namespace

Google.Cloud.Security.PublicCA.V1Beta1

Assembly

Google.Cloud.Security.PublicCA.V1Beta1.dll

Remarks

Manages the resources required for ACME external account binding for the public certificate authority service.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default PublicCertificateAuthorityService scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default PublicCertificateAuthorityService scopes are:

GrpcClient

public virtual PublicCertificateAuthorityService.PublicCertificateAuthorityServiceClient GrpcClient { get; }

The underlying gRPC PublicCertificateAuthorityService client

Property Value
Type Description
PublicCertificateAuthorityServicePublicCertificateAuthorityServiceClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

Create()

public static PublicCertificateAuthorityServiceClient Create()

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

Returns
Type Description
PublicCertificateAuthorityServiceClient

The created PublicCertificateAuthorityServiceClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskPublicCertificateAuthorityServiceClient

The task representing the created PublicCertificateAuthorityServiceClient.

CreateExternalAccountKey(LocationName, ExternalAccountKey, CallSettings)

public virtual ExternalAccountKey CreateExternalAccountKey(LocationName parent, ExternalAccountKey externalAccountKey, CallSettings callSettings = null)

Creates a new [ExternalAccountKey][google.cloud.security.publicca.v1beta1.ExternalAccountKey] bound to the project.

Parameters
Name Description
parent LocationName

Required. The parent resource where this external_account_key will be created. Format: projects/[project_id]/locations/[location]. At present only the "global" location is supported.

externalAccountKey ExternalAccountKey

Required. The external account key to create. This field only exists to future-proof the API. At present, all fields in ExternalAccountKey are output only and all values are ignored. For the purpose of the CreateExternalAccountKeyRequest, set it to a default/empty value.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ExternalAccountKey

The RPC response.

Example
// Create client
PublicCertificateAuthorityServiceClient publicCertificateAuthorityServiceClient = PublicCertificateAuthorityServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
ExternalAccountKey externalAccountKey = new ExternalAccountKey();
// Make the request
ExternalAccountKey response = publicCertificateAuthorityServiceClient.CreateExternalAccountKey(parent, externalAccountKey);

CreateExternalAccountKey(CreateExternalAccountKeyRequest, CallSettings)

public virtual ExternalAccountKey CreateExternalAccountKey(CreateExternalAccountKeyRequest request, CallSettings callSettings = null)

Creates a new [ExternalAccountKey][google.cloud.security.publicca.v1beta1.ExternalAccountKey] bound to the project.

Parameters
Name Description
request CreateExternalAccountKeyRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ExternalAccountKey

The RPC response.

Example
// Create client
PublicCertificateAuthorityServiceClient publicCertificateAuthorityServiceClient = PublicCertificateAuthorityServiceClient.Create();
// Initialize request argument(s)
CreateExternalAccountKeyRequest request = new CreateExternalAccountKeyRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ExternalAccountKey = new ExternalAccountKey(),
};
// Make the request
ExternalAccountKey response = publicCertificateAuthorityServiceClient.CreateExternalAccountKey(request);

CreateExternalAccountKey(string, ExternalAccountKey, CallSettings)

public virtual ExternalAccountKey CreateExternalAccountKey(string parent, ExternalAccountKey externalAccountKey, CallSettings callSettings = null)

Creates a new [ExternalAccountKey][google.cloud.security.publicca.v1beta1.ExternalAccountKey] bound to the project.

Parameters
Name Description
parent string

Required. The parent resource where this external_account_key will be created. Format: projects/[project_id]/locations/[location]. At present only the "global" location is supported.

externalAccountKey ExternalAccountKey

Required. The external account key to create. This field only exists to future-proof the API. At present, all fields in ExternalAccountKey are output only and all values are ignored. For the purpose of the CreateExternalAccountKeyRequest, set it to a default/empty value.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ExternalAccountKey

The RPC response.

Example
// Create client
PublicCertificateAuthorityServiceClient publicCertificateAuthorityServiceClient = PublicCertificateAuthorityServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
ExternalAccountKey externalAccountKey = new ExternalAccountKey();
// Make the request
ExternalAccountKey response = publicCertificateAuthorityServiceClient.CreateExternalAccountKey(parent, externalAccountKey);

CreateExternalAccountKeyAsync(LocationName, ExternalAccountKey, CallSettings)

public virtual Task<ExternalAccountKey> CreateExternalAccountKeyAsync(LocationName parent, ExternalAccountKey externalAccountKey, CallSettings callSettings = null)

Creates a new [ExternalAccountKey][google.cloud.security.publicca.v1beta1.ExternalAccountKey] bound to the project.

Parameters
Name Description
parent LocationName

Required. The parent resource where this external_account_key will be created. Format: projects/[project_id]/locations/[location]. At present only the "global" location is supported.

externalAccountKey ExternalAccountKey

Required. The external account key to create. This field only exists to future-proof the API. At present, all fields in ExternalAccountKey are output only and all values are ignored. For the purpose of the CreateExternalAccountKeyRequest, set it to a default/empty value.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskExternalAccountKey

A Task containing the RPC response.

Example
// Create client
PublicCertificateAuthorityServiceClient publicCertificateAuthorityServiceClient = await PublicCertificateAuthorityServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
ExternalAccountKey externalAccountKey = new ExternalAccountKey();
// Make the request
ExternalAccountKey response = await publicCertificateAuthorityServiceClient.CreateExternalAccountKeyAsync(parent, externalAccountKey);

CreateExternalAccountKeyAsync(LocationName, ExternalAccountKey, CancellationToken)

public virtual Task<ExternalAccountKey> CreateExternalAccountKeyAsync(LocationName parent, ExternalAccountKey externalAccountKey, CancellationToken cancellationToken)

Creates a new [ExternalAccountKey][google.cloud.security.publicca.v1beta1.ExternalAccountKey] bound to the project.

Parameters
Name Description
parent LocationName

Required. The parent resource where this external_account_key will be created. Format: projects/[project_id]/locations/[location]. At present only the "global" location is supported.

externalAccountKey ExternalAccountKey

Required. The external account key to create. This field only exists to future-proof the API. At present, all fields in ExternalAccountKey are output only and all values are ignored. For the purpose of the CreateExternalAccountKeyRequest, set it to a default/empty value.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskExternalAccountKey

A Task containing the RPC response.

Example
// Create client
PublicCertificateAuthorityServiceClient publicCertificateAuthorityServiceClient = await PublicCertificateAuthorityServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
ExternalAccountKey externalAccountKey = new ExternalAccountKey();
// Make the request
ExternalAccountKey response = await publicCertificateAuthorityServiceClient.CreateExternalAccountKeyAsync(parent, externalAccountKey);

CreateExternalAccountKeyAsync(CreateExternalAccountKeyRequest, CallSettings)

public virtual Task<ExternalAccountKey> CreateExternalAccountKeyAsync(CreateExternalAccountKeyRequest request, CallSettings callSettings = null)

Creates a new [ExternalAccountKey][google.cloud.security.publicca.v1beta1.ExternalAccountKey] bound to the project.

Parameters
Name Description
request CreateExternalAccountKeyRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskExternalAccountKey

A Task containing the RPC response.

Example
// Create client
PublicCertificateAuthorityServiceClient publicCertificateAuthorityServiceClient = await PublicCertificateAuthorityServiceClient.CreateAsync();
// Initialize request argument(s)
CreateExternalAccountKeyRequest request = new CreateExternalAccountKeyRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ExternalAccountKey = new ExternalAccountKey(),
};
// Make the request
ExternalAccountKey response = await publicCertificateAuthorityServiceClient.CreateExternalAccountKeyAsync(request);

CreateExternalAccountKeyAsync(CreateExternalAccountKeyRequest, CancellationToken)

public virtual Task<ExternalAccountKey> CreateExternalAccountKeyAsync(CreateExternalAccountKeyRequest request, CancellationToken cancellationToken)

Creates a new [ExternalAccountKey][google.cloud.security.publicca.v1beta1.ExternalAccountKey] bound to the project.

Parameters
Name Description
request CreateExternalAccountKeyRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskExternalAccountKey

A Task containing the RPC response.

Example
// Create client
PublicCertificateAuthorityServiceClient publicCertificateAuthorityServiceClient = await PublicCertificateAuthorityServiceClient.CreateAsync();
// Initialize request argument(s)
CreateExternalAccountKeyRequest request = new CreateExternalAccountKeyRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ExternalAccountKey = new ExternalAccountKey(),
};
// Make the request
ExternalAccountKey response = await publicCertificateAuthorityServiceClient.CreateExternalAccountKeyAsync(request);

CreateExternalAccountKeyAsync(string, ExternalAccountKey, CallSettings)

public virtual Task<ExternalAccountKey> CreateExternalAccountKeyAsync(string parent, ExternalAccountKey externalAccountKey, CallSettings callSettings = null)

Creates a new [ExternalAccountKey][google.cloud.security.publicca.v1beta1.ExternalAccountKey] bound to the project.

Parameters
Name Description
parent string

Required. The parent resource where this external_account_key will be created. Format: projects/[project_id]/locations/[location]. At present only the "global" location is supported.

externalAccountKey ExternalAccountKey

Required. The external account key to create. This field only exists to future-proof the API. At present, all fields in ExternalAccountKey are output only and all values are ignored. For the purpose of the CreateExternalAccountKeyRequest, set it to a default/empty value.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskExternalAccountKey

A Task containing the RPC response.

Example
// Create client
PublicCertificateAuthorityServiceClient publicCertificateAuthorityServiceClient = await PublicCertificateAuthorityServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
ExternalAccountKey externalAccountKey = new ExternalAccountKey();
// Make the request
ExternalAccountKey response = await publicCertificateAuthorityServiceClient.CreateExternalAccountKeyAsync(parent, externalAccountKey);

CreateExternalAccountKeyAsync(string, ExternalAccountKey, CancellationToken)

public virtual Task<ExternalAccountKey> CreateExternalAccountKeyAsync(string parent, ExternalAccountKey externalAccountKey, CancellationToken cancellationToken)

Creates a new [ExternalAccountKey][google.cloud.security.publicca.v1beta1.ExternalAccountKey] bound to the project.

Parameters
Name Description
parent string

Required. The parent resource where this external_account_key will be created. Format: projects/[project_id]/locations/[location]. At present only the "global" location is supported.

externalAccountKey ExternalAccountKey

Required. The external account key to create. This field only exists to future-proof the API. At present, all fields in ExternalAccountKey are output only and all values are ignored. For the purpose of the CreateExternalAccountKeyRequest, set it to a default/empty value.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskExternalAccountKey

A Task containing the RPC response.

Example
// Create client
PublicCertificateAuthorityServiceClient publicCertificateAuthorityServiceClient = await PublicCertificateAuthorityServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
ExternalAccountKey externalAccountKey = new ExternalAccountKey();
// Make the request
ExternalAccountKey response = await publicCertificateAuthorityServiceClient.CreateExternalAccountKeyAsync(parent, externalAccountKey);

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

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

Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

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