Constructor
new AutoscalingPolicyServiceClient(optionsopt)
Construct an instance of AutoscalingPolicyServiceClient.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
The configuration object. See the subsequent parameters for more details. Properties
|
Members
(static) apiEndpoint
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
(static) port
The port for this API service.
(static) scopes
The scopes needed to make gRPC calls for every method defined in this service.
(static) servicePath
The DNS address for this API service.
Methods
close()
Terminate the GRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
createAutoscalingPolicy(request, optionsopt) → {Promise}
Creates new autoscaling policy.
Parameters:
| Name | Type | Attributes | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
deleteAutoscalingPolicy(request, optionsopt) → {Promise}
Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.
Parameters:
| Name | Type | Attributes | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
getAutoscalingPolicy(request, optionsopt) → {Promise}
Retrieves autoscaling policy.
Parameters:
| Name | Type | Attributes | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
getProjectId(callback)
Return the project ID used by this class.
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
function |
the callback to be called with the current project Id. |
initialize() → {Promise}
Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
listAutoscalingPolicies(request, optionsopt) → {Promise}
Lists autoscaling policies in the project.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
listAutoscalingPoliciesAsync(request, optionsopt) → {Object}
Equivalent to listAutoscalingPolicies, but returns an iterable object.
for-await-of syntax is used with the iterable to recursively get response element on-demand.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
listAutoscalingPoliciesStream(request, optionsopt) → {Stream}
Equivalent to listAutoscalingPolicies, but returns a NodeJS Stream object.
This fetches the paged responses for listAutoscalingPolicies continuously and invokes the callback registered for 'data' event for each element in the responses.
The returned object has 'end' method when no more elements are required.
autoPaginate option will be ignored.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
locationPath(project, location) → {string}
Return a fully-qualified location resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
string | |
location |
string |
matchAutoscalingPolicyFromProjectLocationAutoscalingPolicyName(projectLocationAutoscalingPolicyName) → {string}
Parse the autoscaling_policy from ProjectLocationAutoscalingPolicy resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectLocationAutoscalingPolicyName |
string |
A fully-qualified path representing project_location_autoscaling_policy resource. |
matchAutoscalingPolicyFromProjectRegionAutoscalingPolicyName(projectRegionAutoscalingPolicyName) → {string}
Parse the autoscaling_policy from ProjectRegionAutoscalingPolicy resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectRegionAutoscalingPolicyName |
string |
A fully-qualified path representing project_region_autoscaling_policy resource. |
matchLocationFromLocationName(locationName) → {string}
Parse the location from Location resource.
Parameters:
| Name | Type | Description |
|---|---|---|
locationName |
string |
A fully-qualified path representing Location resource. |
matchLocationFromProjectLocationAutoscalingPolicyName(projectLocationAutoscalingPolicyName) → {string}
Parse the location from ProjectLocationAutoscalingPolicy resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectLocationAutoscalingPolicyName |
string |
A fully-qualified path representing project_location_autoscaling_policy resource. |
matchLocationFromProjectLocationWorkflowTemplateName(projectLocationWorkflowTemplateName) → {string}
Parse the location from ProjectLocationWorkflowTemplate resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectLocationWorkflowTemplateName |
string |
A fully-qualified path representing project_location_workflow_template resource. |
matchProjectFromLocationName(locationName) → {string}
Parse the project from Location resource.
Parameters:
| Name | Type | Description |
|---|---|---|
locationName |
string |
A fully-qualified path representing Location resource. |
matchProjectFromProjectLocationAutoscalingPolicyName(projectLocationAutoscalingPolicyName) → {string}
Parse the project from ProjectLocationAutoscalingPolicy resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectLocationAutoscalingPolicyName |
string |
A fully-qualified path representing project_location_autoscaling_policy resource. |
matchProjectFromProjectLocationWorkflowTemplateName(projectLocationWorkflowTemplateName) → {string}
Parse the project from ProjectLocationWorkflowTemplate resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectLocationWorkflowTemplateName |
string |
A fully-qualified path representing project_location_workflow_template resource. |
matchProjectFromProjectName(projectName) → {string}
Parse the project from Project resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectName |
string |
A fully-qualified path representing Project resource. |
matchProjectFromProjectRegionAutoscalingPolicyName(projectRegionAutoscalingPolicyName) → {string}
Parse the project from ProjectRegionAutoscalingPolicy resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectRegionAutoscalingPolicyName |
string |
A fully-qualified path representing project_region_autoscaling_policy resource. |
matchProjectFromProjectRegionWorkflowTemplateName(projectRegionWorkflowTemplateName) → {string}
Parse the project from ProjectRegionWorkflowTemplate resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectRegionWorkflowTemplateName |
string |
A fully-qualified path representing project_region_workflow_template resource. |
matchRegionFromProjectRegionAutoscalingPolicyName(projectRegionAutoscalingPolicyName) → {string}
Parse the region from ProjectRegionAutoscalingPolicy resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectRegionAutoscalingPolicyName |
string |
A fully-qualified path representing project_region_autoscaling_policy resource. |
matchRegionFromProjectRegionWorkflowTemplateName(projectRegionWorkflowTemplateName) → {string}
Parse the region from ProjectRegionWorkflowTemplate resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectRegionWorkflowTemplateName |
string |
A fully-qualified path representing project_region_workflow_template resource. |
matchWorkflowTemplateFromProjectLocationWorkflowTemplateName(projectLocationWorkflowTemplateName) → {string}
Parse the workflow_template from ProjectLocationWorkflowTemplate resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectLocationWorkflowTemplateName |
string |
A fully-qualified path representing project_location_workflow_template resource. |
matchWorkflowTemplateFromProjectRegionWorkflowTemplateName(projectRegionWorkflowTemplateName) → {string}
Parse the workflow_template from ProjectRegionWorkflowTemplate resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectRegionWorkflowTemplateName |
string |
A fully-qualified path representing project_region_workflow_template resource. |
projectLocationAutoscalingPolicyPath(project, location, autoscaling_policy) → {string}
Return a fully-qualified projectLocationAutoscalingPolicy resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
string | |
location |
string | |
autoscaling_policy |
string |
projectLocationWorkflowTemplatePath(project, location, workflow_template) → {string}
Return a fully-qualified projectLocationWorkflowTemplate resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
string | |
location |
string | |
workflow_template |
string |
projectPath(project) → {string}
Return a fully-qualified project resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
string |
projectRegionAutoscalingPolicyPath(project, region, autoscaling_policy) → {string}
Return a fully-qualified projectRegionAutoscalingPolicy resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
string | |
region |
string | |
autoscaling_policy |
string |
projectRegionWorkflowTemplatePath(project, region, workflow_template) → {string}
Return a fully-qualified projectRegionWorkflowTemplate resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
string | |
region |
string | |
workflow_template |
string |
updateAutoscalingPolicy(request, optionsopt) → {Promise}
Updates (replaces) autoscaling policy.
Disabled check for update_mask, because all updates will be full replacements.
Parameters:
| Name | Type | Attributes | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |