public abstract class AutoscalingPolicyServiceClient
AutoscalingPolicyService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Dataproc.V1Assembly
Google.Cloud.Dataproc.V1.dll
Remarks
The API interface for managing autoscaling policies in the Dataproc API.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the AutoscalingPolicyService service, which is a host of "dataproc.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default AutoscalingPolicyService scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyList<String> |
The default AutoscalingPolicyService scopes are:
GrpcClient
public virtual AutoscalingPolicyService.AutoscalingPolicyServiceClient GrpcClient { get; }
The underlying gRPC AutoscalingPolicyService client
Property Value | |
---|---|
Type | Description |
AutoscalingPolicyService.AutoscalingPolicyServiceClient |
Methods
Create()
public static AutoscalingPolicyServiceClient Create()
Synchronously creates a AutoscalingPolicyServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AutoscalingPolicyServiceClientBuilder.
Returns | |
---|---|
Type | Description |
AutoscalingPolicyServiceClient | The created AutoscalingPolicyServiceClient. |
CreateAsync(CancellationToken)
public static Task<AutoscalingPolicyServiceClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a AutoscalingPolicyServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AutoscalingPolicyServiceClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
Task<AutoscalingPolicyServiceClient> | The task representing the created AutoscalingPolicyServiceClient. |
CreateAutoscalingPolicy(LocationName, AutoscalingPolicy, CallSettings)
public virtual AutoscalingPolicy CreateAutoscalingPolicy(LocationName parent, AutoscalingPolicy policy, CallSettings callSettings = null)
Creates new autoscaling policy.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
|
policy | AutoscalingPolicy Required. The autoscaling policy to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
AutoscalingPolicy | The RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
AutoscalingPolicy policy = new AutoscalingPolicy();
// Make the request
AutoscalingPolicy response = autoscalingPolicyServiceClient.CreateAutoscalingPolicy(parent, policy);
CreateAutoscalingPolicy(CreateAutoscalingPolicyRequest, CallSettings)
public virtual AutoscalingPolicy CreateAutoscalingPolicy(CreateAutoscalingPolicyRequest request, CallSettings callSettings = null)
Creates new autoscaling policy.
Parameters | |
---|---|
Name | Description |
request | CreateAutoscalingPolicyRequest 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 |
AutoscalingPolicy | The RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.Create();
// Initialize request argument(s)
CreateAutoscalingPolicyRequest request = new CreateAutoscalingPolicyRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Policy = new AutoscalingPolicy(),
};
// Make the request
AutoscalingPolicy response = autoscalingPolicyServiceClient.CreateAutoscalingPolicy(request);
CreateAutoscalingPolicy(RegionName, AutoscalingPolicy, CallSettings)
public virtual AutoscalingPolicy CreateAutoscalingPolicy(RegionName parent, AutoscalingPolicy policy, CallSettings callSettings = null)
Creates new autoscaling policy.
Parameters | |
---|---|
Name | Description |
parent | RegionName Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
|
policy | AutoscalingPolicy Required. The autoscaling policy to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
AutoscalingPolicy | The RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.Create();
// Initialize request argument(s)
RegionName parent = RegionName.FromProjectRegion("[PROJECT]", "[REGION]");
AutoscalingPolicy policy = new AutoscalingPolicy();
// Make the request
AutoscalingPolicy response = autoscalingPolicyServiceClient.CreateAutoscalingPolicy(parent, policy);
CreateAutoscalingPolicy(String, AutoscalingPolicy, CallSettings)
public virtual AutoscalingPolicy CreateAutoscalingPolicy(string parent, AutoscalingPolicy policy, CallSettings callSettings = null)
Creates new autoscaling policy.
Parameters | |
---|---|
Name | Description |
parent | String Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
|
policy | AutoscalingPolicy Required. The autoscaling policy to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
AutoscalingPolicy | The RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
AutoscalingPolicy policy = new AutoscalingPolicy();
// Make the request
AutoscalingPolicy response = autoscalingPolicyServiceClient.CreateAutoscalingPolicy(parent, policy);
CreateAutoscalingPolicyAsync(LocationName, AutoscalingPolicy, CallSettings)
public virtual Task<AutoscalingPolicy> CreateAutoscalingPolicyAsync(LocationName parent, AutoscalingPolicy policy, CallSettings callSettings = null)
Creates new autoscaling policy.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
|
policy | AutoscalingPolicy Required. The autoscaling policy to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<AutoscalingPolicy> | A Task containing the RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
AutoscalingPolicy policy = new AutoscalingPolicy();
// Make the request
AutoscalingPolicy response = await autoscalingPolicyServiceClient.CreateAutoscalingPolicyAsync(parent, policy);
CreateAutoscalingPolicyAsync(LocationName, AutoscalingPolicy, CancellationToken)
public virtual Task<AutoscalingPolicy> CreateAutoscalingPolicyAsync(LocationName parent, AutoscalingPolicy policy, CancellationToken cancellationToken)
Creates new autoscaling policy.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
|
policy | AutoscalingPolicy Required. The autoscaling policy to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<AutoscalingPolicy> | A Task containing the RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
AutoscalingPolicy policy = new AutoscalingPolicy();
// Make the request
AutoscalingPolicy response = await autoscalingPolicyServiceClient.CreateAutoscalingPolicyAsync(parent, policy);
CreateAutoscalingPolicyAsync(CreateAutoscalingPolicyRequest, CallSettings)
public virtual Task<AutoscalingPolicy> CreateAutoscalingPolicyAsync(CreateAutoscalingPolicyRequest request, CallSettings callSettings = null)
Creates new autoscaling policy.
Parameters | |
---|---|
Name | Description |
request | CreateAutoscalingPolicyRequest 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 |
Task<AutoscalingPolicy> | A Task containing the RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
CreateAutoscalingPolicyRequest request = new CreateAutoscalingPolicyRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Policy = new AutoscalingPolicy(),
};
// Make the request
AutoscalingPolicy response = await autoscalingPolicyServiceClient.CreateAutoscalingPolicyAsync(request);
CreateAutoscalingPolicyAsync(CreateAutoscalingPolicyRequest, CancellationToken)
public virtual Task<AutoscalingPolicy> CreateAutoscalingPolicyAsync(CreateAutoscalingPolicyRequest request, CancellationToken cancellationToken)
Creates new autoscaling policy.
Parameters | |
---|---|
Name | Description |
request | CreateAutoscalingPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<AutoscalingPolicy> | A Task containing the RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
CreateAutoscalingPolicyRequest request = new CreateAutoscalingPolicyRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Policy = new AutoscalingPolicy(),
};
// Make the request
AutoscalingPolicy response = await autoscalingPolicyServiceClient.CreateAutoscalingPolicyAsync(request);
CreateAutoscalingPolicyAsync(RegionName, AutoscalingPolicy, CallSettings)
public virtual Task<AutoscalingPolicy> CreateAutoscalingPolicyAsync(RegionName parent, AutoscalingPolicy policy, CallSettings callSettings = null)
Creates new autoscaling policy.
Parameters | |
---|---|
Name | Description |
parent | RegionName Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
|
policy | AutoscalingPolicy Required. The autoscaling policy to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<AutoscalingPolicy> | A Task containing the RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
RegionName parent = RegionName.FromProjectRegion("[PROJECT]", "[REGION]");
AutoscalingPolicy policy = new AutoscalingPolicy();
// Make the request
AutoscalingPolicy response = await autoscalingPolicyServiceClient.CreateAutoscalingPolicyAsync(parent, policy);
CreateAutoscalingPolicyAsync(RegionName, AutoscalingPolicy, CancellationToken)
public virtual Task<AutoscalingPolicy> CreateAutoscalingPolicyAsync(RegionName parent, AutoscalingPolicy policy, CancellationToken cancellationToken)
Creates new autoscaling policy.
Parameters | |
---|---|
Name | Description |
parent | RegionName Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
|
policy | AutoscalingPolicy Required. The autoscaling policy to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<AutoscalingPolicy> | A Task containing the RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
RegionName parent = RegionName.FromProjectRegion("[PROJECT]", "[REGION]");
AutoscalingPolicy policy = new AutoscalingPolicy();
// Make the request
AutoscalingPolicy response = await autoscalingPolicyServiceClient.CreateAutoscalingPolicyAsync(parent, policy);
CreateAutoscalingPolicyAsync(String, AutoscalingPolicy, CallSettings)
public virtual Task<AutoscalingPolicy> CreateAutoscalingPolicyAsync(string parent, AutoscalingPolicy policy, CallSettings callSettings = null)
Creates new autoscaling policy.
Parameters | |
---|---|
Name | Description |
parent | String Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
|
policy | AutoscalingPolicy Required. The autoscaling policy to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<AutoscalingPolicy> | A Task containing the RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
AutoscalingPolicy policy = new AutoscalingPolicy();
// Make the request
AutoscalingPolicy response = await autoscalingPolicyServiceClient.CreateAutoscalingPolicyAsync(parent, policy);
CreateAutoscalingPolicyAsync(String, AutoscalingPolicy, CancellationToken)
public virtual Task<AutoscalingPolicy> CreateAutoscalingPolicyAsync(string parent, AutoscalingPolicy policy, CancellationToken cancellationToken)
Creates new autoscaling policy.
Parameters | |
---|---|
Name | Description |
parent | String Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
|
policy | AutoscalingPolicy Required. The autoscaling policy to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<AutoscalingPolicy> | A Task containing the RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
AutoscalingPolicy policy = new AutoscalingPolicy();
// Make the request
AutoscalingPolicy response = await autoscalingPolicyServiceClient.CreateAutoscalingPolicyAsync(parent, policy);
DeleteAutoscalingPolicy(AutoscalingPolicyName, CallSettings)
public virtual void DeleteAutoscalingPolicy(AutoscalingPolicyName name, CallSettings callSettings = null)
Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.
Parameters | |
---|---|
Name | Description |
name | AutoscalingPolicyName Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.Create();
// Initialize request argument(s)
AutoscalingPolicyName name = AutoscalingPolicyName.FromProjectLocationAutoscalingPolicy("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
// Make the request
autoscalingPolicyServiceClient.DeleteAutoscalingPolicy(name);
DeleteAutoscalingPolicy(DeleteAutoscalingPolicyRequest, CallSettings)
public virtual void DeleteAutoscalingPolicy(DeleteAutoscalingPolicyRequest request, CallSettings callSettings = null)
Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.
Parameters | |
---|---|
Name | Description |
request | DeleteAutoscalingPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.Create();
// Initialize request argument(s)
DeleteAutoscalingPolicyRequest request = new DeleteAutoscalingPolicyRequest
{
AutoscalingPolicyName = AutoscalingPolicyName.FromProjectLocationAutoscalingPolicy("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]"),
};
// Make the request
autoscalingPolicyServiceClient.DeleteAutoscalingPolicy(request);
DeleteAutoscalingPolicy(String, CallSettings)
public virtual void DeleteAutoscalingPolicy(string name, CallSettings callSettings = null)
Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.
Parameters | |
---|---|
Name | Description |
name | String Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/autoscalingPolicies/[AUTOSCALING_POLICY]";
// Make the request
autoscalingPolicyServiceClient.DeleteAutoscalingPolicy(name);
DeleteAutoscalingPolicyAsync(AutoscalingPolicyName, CallSettings)
public virtual Task DeleteAutoscalingPolicyAsync(AutoscalingPolicyName name, CallSettings callSettings = null)
Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.
Parameters | |
---|---|
Name | Description |
name | AutoscalingPolicyName Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
AutoscalingPolicyName name = AutoscalingPolicyName.FromProjectLocationAutoscalingPolicy("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
// Make the request
await autoscalingPolicyServiceClient.DeleteAutoscalingPolicyAsync(name);
DeleteAutoscalingPolicyAsync(AutoscalingPolicyName, CancellationToken)
public virtual Task DeleteAutoscalingPolicyAsync(AutoscalingPolicyName name, CancellationToken cancellationToken)
Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.
Parameters | |
---|---|
Name | Description |
name | AutoscalingPolicyName Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
AutoscalingPolicyName name = AutoscalingPolicyName.FromProjectLocationAutoscalingPolicy("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
// Make the request
await autoscalingPolicyServiceClient.DeleteAutoscalingPolicyAsync(name);
DeleteAutoscalingPolicyAsync(DeleteAutoscalingPolicyRequest, CallSettings)
public virtual Task DeleteAutoscalingPolicyAsync(DeleteAutoscalingPolicyRequest request, CallSettings callSettings = null)
Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.
Parameters | |
---|---|
Name | Description |
request | DeleteAutoscalingPolicyRequest 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 |
Task | A Task containing the RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteAutoscalingPolicyRequest request = new DeleteAutoscalingPolicyRequest
{
AutoscalingPolicyName = AutoscalingPolicyName.FromProjectLocationAutoscalingPolicy("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]"),
};
// Make the request
await autoscalingPolicyServiceClient.DeleteAutoscalingPolicyAsync(request);
DeleteAutoscalingPolicyAsync(DeleteAutoscalingPolicyRequest, CancellationToken)
public virtual Task DeleteAutoscalingPolicyAsync(DeleteAutoscalingPolicyRequest request, CancellationToken cancellationToken)
Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.
Parameters | |
---|---|
Name | Description |
request | DeleteAutoscalingPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteAutoscalingPolicyRequest request = new DeleteAutoscalingPolicyRequest
{
AutoscalingPolicyName = AutoscalingPolicyName.FromProjectLocationAutoscalingPolicy("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]"),
};
// Make the request
await autoscalingPolicyServiceClient.DeleteAutoscalingPolicyAsync(request);
DeleteAutoscalingPolicyAsync(String, CallSettings)
public virtual Task DeleteAutoscalingPolicyAsync(string name, CallSettings callSettings = null)
Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.
Parameters | |
---|---|
Name | Description |
name | String Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/autoscalingPolicies/[AUTOSCALING_POLICY]";
// Make the request
await autoscalingPolicyServiceClient.DeleteAutoscalingPolicyAsync(name);
DeleteAutoscalingPolicyAsync(String, CancellationToken)
public virtual Task DeleteAutoscalingPolicyAsync(string name, CancellationToken cancellationToken)
Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.
Parameters | |
---|---|
Name | Description |
name | String Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/autoscalingPolicies/[AUTOSCALING_POLICY]";
// Make the request
await autoscalingPolicyServiceClient.DeleteAutoscalingPolicyAsync(name);
GetAutoscalingPolicy(AutoscalingPolicyName, CallSettings)
public virtual AutoscalingPolicy GetAutoscalingPolicy(AutoscalingPolicyName name, CallSettings callSettings = null)
Retrieves autoscaling policy.
Parameters | |
---|---|
Name | Description |
name | AutoscalingPolicyName Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
AutoscalingPolicy | The RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.Create();
// Initialize request argument(s)
AutoscalingPolicyName name = AutoscalingPolicyName.FromProjectLocationAutoscalingPolicy("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
// Make the request
AutoscalingPolicy response = autoscalingPolicyServiceClient.GetAutoscalingPolicy(name);
GetAutoscalingPolicy(GetAutoscalingPolicyRequest, CallSettings)
public virtual AutoscalingPolicy GetAutoscalingPolicy(GetAutoscalingPolicyRequest request, CallSettings callSettings = null)
Retrieves autoscaling policy.
Parameters | |
---|---|
Name | Description |
request | GetAutoscalingPolicyRequest 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 |
AutoscalingPolicy | The RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.Create();
// Initialize request argument(s)
GetAutoscalingPolicyRequest request = new GetAutoscalingPolicyRequest
{
AutoscalingPolicyName = AutoscalingPolicyName.FromProjectLocationAutoscalingPolicy("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]"),
};
// Make the request
AutoscalingPolicy response = autoscalingPolicyServiceClient.GetAutoscalingPolicy(request);
GetAutoscalingPolicy(String, CallSettings)
public virtual AutoscalingPolicy GetAutoscalingPolicy(string name, CallSettings callSettings = null)
Retrieves autoscaling policy.
Parameters | |
---|---|
Name | Description |
name | String Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
AutoscalingPolicy | The RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/autoscalingPolicies/[AUTOSCALING_POLICY]";
// Make the request
AutoscalingPolicy response = autoscalingPolicyServiceClient.GetAutoscalingPolicy(name);
GetAutoscalingPolicyAsync(AutoscalingPolicyName, CallSettings)
public virtual Task<AutoscalingPolicy> GetAutoscalingPolicyAsync(AutoscalingPolicyName name, CallSettings callSettings = null)
Retrieves autoscaling policy.
Parameters | |
---|---|
Name | Description |
name | AutoscalingPolicyName Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<AutoscalingPolicy> | A Task containing the RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
AutoscalingPolicyName name = AutoscalingPolicyName.FromProjectLocationAutoscalingPolicy("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
// Make the request
AutoscalingPolicy response = await autoscalingPolicyServiceClient.GetAutoscalingPolicyAsync(name);
GetAutoscalingPolicyAsync(AutoscalingPolicyName, CancellationToken)
public virtual Task<AutoscalingPolicy> GetAutoscalingPolicyAsync(AutoscalingPolicyName name, CancellationToken cancellationToken)
Retrieves autoscaling policy.
Parameters | |
---|---|
Name | Description |
name | AutoscalingPolicyName Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<AutoscalingPolicy> | A Task containing the RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
AutoscalingPolicyName name = AutoscalingPolicyName.FromProjectLocationAutoscalingPolicy("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
// Make the request
AutoscalingPolicy response = await autoscalingPolicyServiceClient.GetAutoscalingPolicyAsync(name);
GetAutoscalingPolicyAsync(GetAutoscalingPolicyRequest, CallSettings)
public virtual Task<AutoscalingPolicy> GetAutoscalingPolicyAsync(GetAutoscalingPolicyRequest request, CallSettings callSettings = null)
Retrieves autoscaling policy.
Parameters | |
---|---|
Name | Description |
request | GetAutoscalingPolicyRequest 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 |
Task<AutoscalingPolicy> | A Task containing the RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
GetAutoscalingPolicyRequest request = new GetAutoscalingPolicyRequest
{
AutoscalingPolicyName = AutoscalingPolicyName.FromProjectLocationAutoscalingPolicy("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]"),
};
// Make the request
AutoscalingPolicy response = await autoscalingPolicyServiceClient.GetAutoscalingPolicyAsync(request);
GetAutoscalingPolicyAsync(GetAutoscalingPolicyRequest, CancellationToken)
public virtual Task<AutoscalingPolicy> GetAutoscalingPolicyAsync(GetAutoscalingPolicyRequest request, CancellationToken cancellationToken)
Retrieves autoscaling policy.
Parameters | |
---|---|
Name | Description |
request | GetAutoscalingPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<AutoscalingPolicy> | A Task containing the RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
GetAutoscalingPolicyRequest request = new GetAutoscalingPolicyRequest
{
AutoscalingPolicyName = AutoscalingPolicyName.FromProjectLocationAutoscalingPolicy("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]"),
};
// Make the request
AutoscalingPolicy response = await autoscalingPolicyServiceClient.GetAutoscalingPolicyAsync(request);
GetAutoscalingPolicyAsync(String, CallSettings)
public virtual Task<AutoscalingPolicy> GetAutoscalingPolicyAsync(string name, CallSettings callSettings = null)
Retrieves autoscaling policy.
Parameters | |
---|---|
Name | Description |
name | String Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<AutoscalingPolicy> | A Task containing the RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/autoscalingPolicies/[AUTOSCALING_POLICY]";
// Make the request
AutoscalingPolicy response = await autoscalingPolicyServiceClient.GetAutoscalingPolicyAsync(name);
GetAutoscalingPolicyAsync(String, CancellationToken)
public virtual Task<AutoscalingPolicy> GetAutoscalingPolicyAsync(string name, CancellationToken cancellationToken)
Retrieves autoscaling policy.
Parameters | |
---|---|
Name | Description |
name | String Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<AutoscalingPolicy> | A Task containing the RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/autoscalingPolicies/[AUTOSCALING_POLICY]";
// Make the request
AutoscalingPolicy response = await autoscalingPolicyServiceClient.GetAutoscalingPolicyAsync(name);
ListAutoscalingPolicies(LocationName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListAutoscalingPoliciesResponse, AutoscalingPolicy> ListAutoscalingPolicies(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists autoscaling policies in the project.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
|
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListAutoscalingPoliciesResponse, AutoscalingPolicy> | A pageable sequence of AutoscalingPolicy resources. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListAutoscalingPoliciesResponse, AutoscalingPolicy> response = autoscalingPolicyServiceClient.ListAutoscalingPolicies(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (AutoscalingPolicy 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 (ListAutoscalingPoliciesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AutoscalingPolicy 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<AutoscalingPolicy> 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 (AutoscalingPolicy 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;
ListAutoscalingPolicies(ListAutoscalingPoliciesRequest, CallSettings)
public virtual PagedEnumerable<ListAutoscalingPoliciesResponse, AutoscalingPolicy> ListAutoscalingPolicies(ListAutoscalingPoliciesRequest request, CallSettings callSettings = null)
Lists autoscaling policies in the project.
Parameters | |
---|---|
Name | Description |
request | ListAutoscalingPoliciesRequest 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 |
PagedEnumerable<ListAutoscalingPoliciesResponse, AutoscalingPolicy> | A pageable sequence of AutoscalingPolicy resources. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.Create();
// Initialize request argument(s)
ListAutoscalingPoliciesRequest request = new ListAutoscalingPoliciesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListAutoscalingPoliciesResponse, AutoscalingPolicy> response = autoscalingPolicyServiceClient.ListAutoscalingPolicies(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (AutoscalingPolicy 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 (ListAutoscalingPoliciesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AutoscalingPolicy 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<AutoscalingPolicy> 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 (AutoscalingPolicy 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;
ListAutoscalingPolicies(RegionName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListAutoscalingPoliciesResponse, AutoscalingPolicy> ListAutoscalingPolicies(RegionName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists autoscaling policies in the project.
Parameters | |
---|---|
Name | Description |
parent | RegionName Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
|
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListAutoscalingPoliciesResponse, AutoscalingPolicy> | A pageable sequence of AutoscalingPolicy resources. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.Create();
// Initialize request argument(s)
RegionName parent = RegionName.FromProjectRegion("[PROJECT]", "[REGION]");
// Make the request
PagedEnumerable<ListAutoscalingPoliciesResponse, AutoscalingPolicy> response = autoscalingPolicyServiceClient.ListAutoscalingPolicies(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (AutoscalingPolicy 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 (ListAutoscalingPoliciesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AutoscalingPolicy 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<AutoscalingPolicy> 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 (AutoscalingPolicy 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;
ListAutoscalingPolicies(String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListAutoscalingPoliciesResponse, AutoscalingPolicy> ListAutoscalingPolicies(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists autoscaling policies in the project.
Parameters | |
---|---|
Name | Description |
parent | String Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
|
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListAutoscalingPoliciesResponse, AutoscalingPolicy> | A pageable sequence of AutoscalingPolicy resources. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListAutoscalingPoliciesResponse, AutoscalingPolicy> response = autoscalingPolicyServiceClient.ListAutoscalingPolicies(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (AutoscalingPolicy 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 (ListAutoscalingPoliciesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AutoscalingPolicy 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<AutoscalingPolicy> 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 (AutoscalingPolicy 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;
ListAutoscalingPoliciesAsync(LocationName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListAutoscalingPoliciesResponse, AutoscalingPolicy> ListAutoscalingPoliciesAsync(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists autoscaling policies in the project.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
|
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListAutoscalingPoliciesResponse, AutoscalingPolicy> | A pageable asynchronous sequence of AutoscalingPolicy resources. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListAutoscalingPoliciesResponse, AutoscalingPolicy> response = autoscalingPolicyServiceClient.ListAutoscalingPoliciesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AutoscalingPolicy 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((ListAutoscalingPoliciesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AutoscalingPolicy 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<AutoscalingPolicy> 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 (AutoscalingPolicy 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;
ListAutoscalingPoliciesAsync(ListAutoscalingPoliciesRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListAutoscalingPoliciesResponse, AutoscalingPolicy> ListAutoscalingPoliciesAsync(ListAutoscalingPoliciesRequest request, CallSettings callSettings = null)
Lists autoscaling policies in the project.
Parameters | |
---|---|
Name | Description |
request | ListAutoscalingPoliciesRequest 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 |
PagedAsyncEnumerable<ListAutoscalingPoliciesResponse, AutoscalingPolicy> | A pageable asynchronous sequence of AutoscalingPolicy resources. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
ListAutoscalingPoliciesRequest request = new ListAutoscalingPoliciesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListAutoscalingPoliciesResponse, AutoscalingPolicy> response = autoscalingPolicyServiceClient.ListAutoscalingPoliciesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AutoscalingPolicy 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((ListAutoscalingPoliciesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AutoscalingPolicy 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<AutoscalingPolicy> 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 (AutoscalingPolicy 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;
ListAutoscalingPoliciesAsync(RegionName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListAutoscalingPoliciesResponse, AutoscalingPolicy> ListAutoscalingPoliciesAsync(RegionName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists autoscaling policies in the project.
Parameters | |
---|---|
Name | Description |
parent | RegionName Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
|
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListAutoscalingPoliciesResponse, AutoscalingPolicy> | A pageable asynchronous sequence of AutoscalingPolicy resources. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
RegionName parent = RegionName.FromProjectRegion("[PROJECT]", "[REGION]");
// Make the request
PagedAsyncEnumerable<ListAutoscalingPoliciesResponse, AutoscalingPolicy> response = autoscalingPolicyServiceClient.ListAutoscalingPoliciesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AutoscalingPolicy 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((ListAutoscalingPoliciesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AutoscalingPolicy 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<AutoscalingPolicy> 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 (AutoscalingPolicy 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;
ListAutoscalingPoliciesAsync(String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListAutoscalingPoliciesResponse, AutoscalingPolicy> ListAutoscalingPoliciesAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists autoscaling policies in the project.
Parameters | |
---|---|
Name | Description |
parent | String Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
|
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListAutoscalingPoliciesResponse, AutoscalingPolicy> | A pageable asynchronous sequence of AutoscalingPolicy resources. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListAutoscalingPoliciesResponse, AutoscalingPolicy> response = autoscalingPolicyServiceClient.ListAutoscalingPoliciesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AutoscalingPolicy 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((ListAutoscalingPoliciesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AutoscalingPolicy 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<AutoscalingPolicy> 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 (AutoscalingPolicy 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;
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. |
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.
UpdateAutoscalingPolicy(AutoscalingPolicy, CallSettings)
public virtual AutoscalingPolicy UpdateAutoscalingPolicy(AutoscalingPolicy policy, CallSettings callSettings = null)
Updates (replaces) autoscaling policy.
Disabled check for update_mask, because all updates will be full replacements.
Parameters | |
---|---|
Name | Description |
policy | AutoscalingPolicy Required. The updated autoscaling policy. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
AutoscalingPolicy | The RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.Create();
// Initialize request argument(s)
AutoscalingPolicy policy = new AutoscalingPolicy();
// Make the request
AutoscalingPolicy response = autoscalingPolicyServiceClient.UpdateAutoscalingPolicy(policy);
UpdateAutoscalingPolicy(UpdateAutoscalingPolicyRequest, CallSettings)
public virtual AutoscalingPolicy UpdateAutoscalingPolicy(UpdateAutoscalingPolicyRequest request, CallSettings callSettings = null)
Updates (replaces) autoscaling policy.
Disabled check for update_mask, because all updates will be full replacements.
Parameters | |
---|---|
Name | Description |
request | UpdateAutoscalingPolicyRequest 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 |
AutoscalingPolicy | The RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.Create();
// Initialize request argument(s)
UpdateAutoscalingPolicyRequest request = new UpdateAutoscalingPolicyRequest
{
Policy = new AutoscalingPolicy(),
};
// Make the request
AutoscalingPolicy response = autoscalingPolicyServiceClient.UpdateAutoscalingPolicy(request);
UpdateAutoscalingPolicyAsync(AutoscalingPolicy, CallSettings)
public virtual Task<AutoscalingPolicy> UpdateAutoscalingPolicyAsync(AutoscalingPolicy policy, CallSettings callSettings = null)
Updates (replaces) autoscaling policy.
Disabled check for update_mask, because all updates will be full replacements.
Parameters | |
---|---|
Name | Description |
policy | AutoscalingPolicy Required. The updated autoscaling policy. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<AutoscalingPolicy> | A Task containing the RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
AutoscalingPolicy policy = new AutoscalingPolicy();
// Make the request
AutoscalingPolicy response = await autoscalingPolicyServiceClient.UpdateAutoscalingPolicyAsync(policy);
UpdateAutoscalingPolicyAsync(AutoscalingPolicy, CancellationToken)
public virtual Task<AutoscalingPolicy> UpdateAutoscalingPolicyAsync(AutoscalingPolicy policy, CancellationToken cancellationToken)
Updates (replaces) autoscaling policy.
Disabled check for update_mask, because all updates will be full replacements.
Parameters | |
---|---|
Name | Description |
policy | AutoscalingPolicy Required. The updated autoscaling policy. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<AutoscalingPolicy> | A Task containing the RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
AutoscalingPolicy policy = new AutoscalingPolicy();
// Make the request
AutoscalingPolicy response = await autoscalingPolicyServiceClient.UpdateAutoscalingPolicyAsync(policy);
UpdateAutoscalingPolicyAsync(UpdateAutoscalingPolicyRequest, CallSettings)
public virtual Task<AutoscalingPolicy> UpdateAutoscalingPolicyAsync(UpdateAutoscalingPolicyRequest request, CallSettings callSettings = null)
Updates (replaces) autoscaling policy.
Disabled check for update_mask, because all updates will be full replacements.
Parameters | |
---|---|
Name | Description |
request | UpdateAutoscalingPolicyRequest 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 |
Task<AutoscalingPolicy> | A Task containing the RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateAutoscalingPolicyRequest request = new UpdateAutoscalingPolicyRequest
{
Policy = new AutoscalingPolicy(),
};
// Make the request
AutoscalingPolicy response = await autoscalingPolicyServiceClient.UpdateAutoscalingPolicyAsync(request);
UpdateAutoscalingPolicyAsync(UpdateAutoscalingPolicyRequest, CancellationToken)
public virtual Task<AutoscalingPolicy> UpdateAutoscalingPolicyAsync(UpdateAutoscalingPolicyRequest request, CancellationToken cancellationToken)
Updates (replaces) autoscaling policy.
Disabled check for update_mask, because all updates will be full replacements.
Parameters | |
---|---|
Name | Description |
request | UpdateAutoscalingPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<AutoscalingPolicy> | A Task containing the RPC response. |
// Create client
AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateAutoscalingPolicyRequest request = new UpdateAutoscalingPolicyRequest
{
Policy = new AutoscalingPolicy(),
};
// Make the request
AutoscalingPolicy response = await autoscalingPolicyServiceClient.UpdateAutoscalingPolicyAsync(request);