Synchronize new proto/yaml changes.
PiperOrigin-RevId: 276061853
This commit is contained in:
parent
654f6ac2a5
commit
4195b2f2db
|
|
@ -3,11 +3,12 @@ common:
|
|||
api_version: v1beta1
|
||||
organization_name: google-cloud
|
||||
proto_deps:
|
||||
- name: google-common-protos
|
||||
- name: google-common-protos
|
||||
src_proto_paths:
|
||||
- v1beta1
|
||||
service_yaml: cloudscheduler_v1beta1.yaml
|
||||
service_yaml: v1beta1/cloudscheduler_v1beta1.yaml
|
||||
gapic_yaml: v1beta1/cloudscheduler_gapic.yaml
|
||||
proto_package: google.cloud.scheduler.v1beta1
|
||||
artifacts:
|
||||
- name: gapic_config
|
||||
type: GAPIC_CONFIG
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ syntax = "proto3";
|
|||
package google.cloud.scheduler.v1beta1;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/client.proto";
|
||||
import "google/api/field_behavior.proto";
|
||||
import "google/api/resource.proto";
|
||||
import "google/cloud/scheduler/v1beta1/job.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
|
|
@ -32,11 +34,15 @@ option objc_class_prefix = "SCHEDULER";
|
|||
// The Cloud Scheduler API allows external entities to reliably
|
||||
// schedule asynchronous jobs.
|
||||
service CloudScheduler {
|
||||
option (google.api.default_host) = "cloudscheduler.googleapis.com";
|
||||
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
|
||||
|
||||
// Lists jobs.
|
||||
rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1beta1/{parent=projects/*/locations/*}/jobs"
|
||||
};
|
||||
option (google.api.method_signature) = "parent";
|
||||
}
|
||||
|
||||
// Gets a job.
|
||||
|
|
@ -44,6 +50,7 @@ service CloudScheduler {
|
|||
option (google.api.http) = {
|
||||
get: "/v1beta1/{name=projects/*/locations/*/jobs/*}"
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
|
||||
// Creates a job.
|
||||
|
|
@ -52,6 +59,7 @@ service CloudScheduler {
|
|||
post: "/v1beta1/{parent=projects/*/locations/*}/jobs"
|
||||
body: "job"
|
||||
};
|
||||
option (google.api.method_signature) = "parent,job";
|
||||
}
|
||||
|
||||
// Updates a job.
|
||||
|
|
@ -68,6 +76,7 @@ service CloudScheduler {
|
|||
patch: "/v1beta1/{job.name=projects/*/locations/*/jobs/*}"
|
||||
body: "job"
|
||||
};
|
||||
option (google.api.method_signature) = "job,update_mask";
|
||||
}
|
||||
|
||||
// Deletes a job.
|
||||
|
|
@ -75,6 +84,7 @@ service CloudScheduler {
|
|||
option (google.api.http) = {
|
||||
delete: "/v1beta1/{name=projects/*/locations/*/jobs/*}"
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
|
||||
// Pauses a job.
|
||||
|
|
@ -89,6 +99,7 @@ service CloudScheduler {
|
|||
post: "/v1beta1/{name=projects/*/locations/*/jobs/*}:pause"
|
||||
body: "*"
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
|
||||
// Resume a job.
|
||||
|
|
@ -102,6 +113,7 @@ service CloudScheduler {
|
|||
post: "/v1beta1/{name=projects/*/locations/*/jobs/*}:resume"
|
||||
body: "*"
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
|
||||
// Forces a job to run now.
|
||||
|
|
@ -113,16 +125,20 @@ service CloudScheduler {
|
|||
post: "/v1beta1/{name=projects/*/locations/*/jobs/*}:run"
|
||||
body: "*"
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
}
|
||||
|
||||
// Request message for listing jobs using [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs].
|
||||
message ListJobsRequest {
|
||||
// Required.
|
||||
//
|
||||
// The location name. For example:
|
||||
// Required. The location name. For example:
|
||||
// `projects/PROJECT_ID/locations/LOCATION_ID`.
|
||||
string parent = 1;
|
||||
string parent = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = {
|
||||
child_type: "cloudscheduler.googleapis.com/Job"
|
||||
}
|
||||
];
|
||||
|
||||
// Requested page size.
|
||||
//
|
||||
|
|
@ -159,40 +175,37 @@ message ListJobsResponse {
|
|||
|
||||
// Request message for [GetJob][google.cloud.scheduler.v1beta1.CloudScheduler.GetJob].
|
||||
message GetJobRequest {
|
||||
// Required.
|
||||
//
|
||||
// The job name. For example:
|
||||
// Required. The job name. For example:
|
||||
// `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
|
||||
string name = 1;
|
||||
string name = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
}
|
||||
|
||||
// Request message for [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob].
|
||||
message CreateJobRequest {
|
||||
// Required.
|
||||
//
|
||||
// The location name. For example:
|
||||
// Required. The location name. For example:
|
||||
// `projects/PROJECT_ID/locations/LOCATION_ID`.
|
||||
string parent = 1;
|
||||
string parent = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = {
|
||||
child_type: "cloudscheduler.googleapis.com/Job"
|
||||
}
|
||||
];
|
||||
|
||||
// Required.
|
||||
//
|
||||
// The job to add. The user can optionally specify a name for the
|
||||
// Required. The job to add. The user can optionally specify a name for the
|
||||
// job in [name][google.cloud.scheduler.v1beta1.Job.name]. [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
|
||||
// existing job. If a name is not specified then the system will
|
||||
// generate a random unique name that will be returned
|
||||
// ([name][google.cloud.scheduler.v1beta1.Job.name]) in the response.
|
||||
Job job = 2;
|
||||
Job job = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
}
|
||||
|
||||
// Request message for [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
|
||||
message UpdateJobRequest {
|
||||
// Required.
|
||||
//
|
||||
// The new job properties. [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
|
||||
// Required. The new job properties. [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
|
||||
//
|
||||
// Output only fields cannot be modified using UpdateJob.
|
||||
// Any value specified for an output only field will be ignored.
|
||||
Job job = 1;
|
||||
Job job = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// A mask used to specify which fields of the job are being updated.
|
||||
google.protobuf.FieldMask update_mask = 2;
|
||||
|
|
@ -201,37 +214,49 @@ message UpdateJobRequest {
|
|||
// Request message for deleting a job using
|
||||
// [DeleteJob][google.cloud.scheduler.v1beta1.CloudScheduler.DeleteJob].
|
||||
message DeleteJobRequest {
|
||||
// Required.
|
||||
//
|
||||
// The job name. For example:
|
||||
// Required. The job name. For example:
|
||||
// `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
|
||||
string name = 1;
|
||||
string name = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = {
|
||||
type: "cloudscheduler.googleapis.com/Job"
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
// Request message for [PauseJob][google.cloud.scheduler.v1beta1.CloudScheduler.PauseJob].
|
||||
message PauseJobRequest {
|
||||
// Required.
|
||||
//
|
||||
// The job name. For example:
|
||||
// Required. The job name. For example:
|
||||
// `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
|
||||
string name = 1;
|
||||
string name = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = {
|
||||
type: "cloudscheduler.googleapis.com/Job"
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
// Request message for [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob].
|
||||
message ResumeJobRequest {
|
||||
// Required.
|
||||
//
|
||||
// The job name. For example:
|
||||
// Required. The job name. For example:
|
||||
// `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
|
||||
string name = 1;
|
||||
string name = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = {
|
||||
type: "cloudscheduler.googleapis.com/Job"
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
// Request message for forcing a job to run now using
|
||||
// [RunJob][google.cloud.scheduler.v1beta1.CloudScheduler.RunJob].
|
||||
message RunJobRequest {
|
||||
// Required.
|
||||
//
|
||||
// The job name. For example:
|
||||
// Required. The job name. For example:
|
||||
// `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
|
||||
string name = 1;
|
||||
string name = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = {
|
||||
type: "cloudscheduler.googleapis.com/Job"
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,257 @@
|
|||
type: com.google.api.codegen.ConfigProto
|
||||
config_schema_version: 1.0.0
|
||||
# The settings of generated code in a specific language.
|
||||
language_settings:
|
||||
java:
|
||||
package_name: com.google.cloud.scheduler.v1beta1
|
||||
python:
|
||||
package_name: google.cloud.scheduler_v1beta1.gapic
|
||||
go:
|
||||
package_name: cloud.google.com/go/scheduler/apiv1beta1
|
||||
csharp:
|
||||
package_name: Google.Cloud.Scheduler.V1Beta1
|
||||
ruby:
|
||||
package_name: Google::Cloud::Scheduler::V1beta1
|
||||
php:
|
||||
package_name: Google\Cloud\Scheduler\V1beta1
|
||||
nodejs:
|
||||
package_name: scheduler.v1beta1
|
||||
domain_layer_location: google-cloud
|
||||
# A list of API interface configurations.
|
||||
interfaces:
|
||||
- name: google.cloud.scheduler.v1beta1.CloudScheduler
|
||||
# A list of resource collection configurations.
|
||||
# Consists of a name_pattern and an entity_name.
|
||||
# The name_pattern is a pattern to describe the names of the resources of this
|
||||
# collection, using the platform's conventions for URI patterns. A generator
|
||||
# may use this to generate methods to compose and decompose such names. The
|
||||
# pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
|
||||
# those will be taken as hints for the parameter names of the generated
|
||||
# methods. If empty, no name methods are generated.
|
||||
# The entity_name is the name to be used as a basis for generated methods and
|
||||
# classes.
|
||||
collections:
|
||||
- name_pattern: projects/{project}
|
||||
entity_name: project
|
||||
language_overrides:
|
||||
- language: csharp
|
||||
common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
|
||||
- name_pattern: projects/{project}/locations/{location}
|
||||
entity_name: location
|
||||
- name_pattern: projects/{project}/locations/{location}/jobs/{job}
|
||||
entity_name: job
|
||||
# Definition for retryable codes.
|
||||
retry_codes_def:
|
||||
- name: idempotent
|
||||
retry_codes:
|
||||
- DEADLINE_EXCEEDED
|
||||
- UNAVAILABLE
|
||||
- name: non_idempotent
|
||||
retry_codes: []
|
||||
# Definition for retry/backoff parameters.
|
||||
retry_params_def:
|
||||
- name: default
|
||||
initial_retry_delay_millis: 100
|
||||
retry_delay_multiplier: 1.3
|
||||
max_retry_delay_millis: 60000
|
||||
initial_rpc_timeout_millis: 20000
|
||||
rpc_timeout_multiplier: 1
|
||||
max_rpc_timeout_millis: 20000
|
||||
total_timeout_millis: 600000
|
||||
# A list of method configurations.
|
||||
# Common properties:
|
||||
#
|
||||
# name - The simple name of the method.
|
||||
#
|
||||
# flattening - Specifies the configuration for parameter flattening.
|
||||
# Describes the parameter groups for which a generator should produce method
|
||||
# overloads which allow a client to directly pass request message fields as
|
||||
# method parameters. This information may or may not be used, depending on
|
||||
# the target language.
|
||||
# Consists of groups, which each represent a list of parameters to be
|
||||
# flattened. Each parameter listed must be a field of the request message.
|
||||
#
|
||||
# required_fields - Fields that are always required for a request to be
|
||||
# valid.
|
||||
#
|
||||
# resource_name_treatment - An enum that specifies how to treat the resource
|
||||
# name formats defined in the field_name_patterns and
|
||||
# response_field_name_patterns fields.
|
||||
# UNSET: default value
|
||||
# NONE: the collection configs will not be used by the generated code.
|
||||
# VALIDATE: string fields will be validated by the client against the
|
||||
# specified resource name formats.
|
||||
# STATIC_TYPES: the client will use generated types for resource names.
|
||||
#
|
||||
# page_streaming - Specifies the configuration for paging.
|
||||
# Describes information for generating a method which transforms a paging
|
||||
# list RPC into a stream of resources.
|
||||
# Consists of a request and a response.
|
||||
# The request specifies request information of the list method. It defines
|
||||
# which fields match the paging pattern in the request. The request consists
|
||||
# of a page_size_field and a token_field. The page_size_field is the name of
|
||||
# the optional field specifying the maximum number of elements to be
|
||||
# returned in the response. The token_field is the name of the field in the
|
||||
# request containing the page token.
|
||||
# The response specifies response information of the list method. It defines
|
||||
# which fields match the paging pattern in the response. The response
|
||||
# consists of a token_field and a resources_field. The token_field is the
|
||||
# name of the field in the response containing the next page token. The
|
||||
# resources_field is the name of the field in the response containing the
|
||||
# list of resources belonging to the page.
|
||||
#
|
||||
# retry_codes_name - Specifies the configuration for retryable codes. The
|
||||
# name must be defined in interfaces.retry_codes_def.
|
||||
#
|
||||
# retry_params_name - Specifies the configuration for retry/backoff
|
||||
# parameters. The name must be defined in interfaces.retry_params_def.
|
||||
#
|
||||
# field_name_patterns - Maps the field name of the request type to
|
||||
# entity_name of interfaces.collections.
|
||||
# Specifies the string pattern that the field must follow.
|
||||
#
|
||||
# timeout_millis - Specifies the default timeout for a non-retrying call. If
|
||||
# the call is retrying, refer to retry_params_name instead.
|
||||
methods:
|
||||
- name: ListJobs
|
||||
resource_name_treatment: STATIC_TYPES
|
||||
flattening:
|
||||
groups:
|
||||
- parameters:
|
||||
- parent
|
||||
required_fields:
|
||||
- parent
|
||||
page_streaming:
|
||||
request:
|
||||
page_size_field: page_size
|
||||
token_field: page_token
|
||||
response:
|
||||
token_field: next_page_token
|
||||
resources_field: jobs
|
||||
retry_codes_name: idempotent
|
||||
retry_params_name: default
|
||||
field_name_patterns:
|
||||
parent: location
|
||||
timeout_millis: 10000
|
||||
- name: GetJob
|
||||
resource_name_treatment: STATIC_TYPES
|
||||
flattening:
|
||||
groups:
|
||||
- parameters:
|
||||
- name
|
||||
required_fields:
|
||||
- name
|
||||
retry_codes_name: idempotent
|
||||
retry_params_name: default
|
||||
field_name_patterns:
|
||||
name: job
|
||||
timeout_millis: 10000
|
||||
- name: CreateJob
|
||||
resource_name_treatment: STATIC_TYPES
|
||||
flattening:
|
||||
groups:
|
||||
- parameters:
|
||||
- parent
|
||||
- job
|
||||
required_fields:
|
||||
- parent
|
||||
- job
|
||||
retry_codes_name: non_idempotent
|
||||
retry_params_name: default
|
||||
field_name_patterns:
|
||||
parent: location
|
||||
timeout_millis: 10000
|
||||
- name: UpdateJob
|
||||
resource_name_treatment: STATIC_TYPES
|
||||
flattening:
|
||||
groups:
|
||||
- parameters:
|
||||
- job
|
||||
- update_mask
|
||||
required_fields:
|
||||
- job
|
||||
retry_codes_name: non_idempotent
|
||||
retry_params_name: default
|
||||
field_name_patterns:
|
||||
job.name: job
|
||||
timeout_millis: 10000
|
||||
- name: DeleteJob
|
||||
resource_name_treatment: STATIC_TYPES
|
||||
flattening:
|
||||
groups:
|
||||
- parameters:
|
||||
- name
|
||||
required_fields:
|
||||
- name
|
||||
retry_codes_name: idempotent
|
||||
retry_params_name: default
|
||||
field_name_patterns:
|
||||
name: job
|
||||
timeout_millis: 10000
|
||||
- name: PauseJob
|
||||
resource_name_treatment: STATIC_TYPES
|
||||
flattening:
|
||||
groups:
|
||||
- parameters:
|
||||
- name
|
||||
required_fields:
|
||||
- name
|
||||
retry_codes_name: idempotent
|
||||
retry_params_name: default
|
||||
field_name_patterns:
|
||||
name: job
|
||||
timeout_millis: 10000
|
||||
- name: ResumeJob
|
||||
resource_name_treatment: STATIC_TYPES
|
||||
flattening:
|
||||
groups:
|
||||
- parameters:
|
||||
- name
|
||||
required_fields:
|
||||
- name
|
||||
retry_codes_name: idempotent
|
||||
retry_params_name: default
|
||||
field_name_patterns:
|
||||
name: job
|
||||
timeout_millis: 10000
|
||||
- name: RunJob
|
||||
resource_name_treatment: STATIC_TYPES
|
||||
flattening:
|
||||
groups:
|
||||
- parameters:
|
||||
- name
|
||||
required_fields:
|
||||
- name
|
||||
retry_codes_name: non_idempotent
|
||||
retry_params_name: default
|
||||
field_name_patterns:
|
||||
name: job
|
||||
timeout_millis: 10000
|
||||
resource_name_generation:
|
||||
- message_name: Job
|
||||
field_entity_map:
|
||||
name: job
|
||||
- message_name: ListJobsRequest
|
||||
field_entity_map:
|
||||
parent: location
|
||||
- message_name: GetJobRequest
|
||||
field_entity_map:
|
||||
name: job
|
||||
- message_name: CreateJobRequest
|
||||
field_entity_map:
|
||||
parent: location
|
||||
- message_name: UpdateJobRequest
|
||||
field_entity_map:
|
||||
job.name: job
|
||||
- message_name: DeleteJobRequest
|
||||
field_entity_map:
|
||||
name: job
|
||||
- message_name: PauseJobRequest
|
||||
field_entity_map:
|
||||
name: job
|
||||
- message_name: ResumeJobRequest
|
||||
field_entity_map:
|
||||
name: job
|
||||
- message_name: RunJobRequest
|
||||
field_entity_map:
|
||||
name: job
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
type: com.google.api.codegen.ConfigProto
|
||||
config_schema_version: 1.0.0
|
||||
config_schema_version: 2.0.0
|
||||
# The settings of generated code in a specific language.
|
||||
language_settings:
|
||||
java:
|
||||
|
|
@ -17,242 +17,3 @@ language_settings:
|
|||
nodejs:
|
||||
package_name: scheduler.v1beta1
|
||||
domain_layer_location: google-cloud
|
||||
# A list of API interface configurations.
|
||||
interfaces:
|
||||
# The fully qualified name of the API interface.
|
||||
- name: google.cloud.scheduler.v1beta1.CloudScheduler
|
||||
# A list of resource collection configurations.
|
||||
# Consists of a name_pattern and an entity_name.
|
||||
# The name_pattern is a pattern to describe the names of the resources of this
|
||||
# collection, using the platform's conventions for URI patterns. A generator
|
||||
# may use this to generate methods to compose and decompose such names. The
|
||||
# pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
|
||||
# those will be taken as hints for the parameter names of the generated
|
||||
# methods. If empty, no name methods are generated.
|
||||
# The entity_name is the name to be used as a basis for generated methods and
|
||||
# classes.
|
||||
collections:
|
||||
- name_pattern: projects/{project}
|
||||
entity_name: project
|
||||
language_overrides:
|
||||
- language: csharp
|
||||
common_resource_name: Google.Api.Gax.ResourceNames.ProjectName
|
||||
- name_pattern: projects/{project}/locations/{location}
|
||||
entity_name: location
|
||||
- name_pattern: projects/{project}/locations/{location}/jobs/{job}
|
||||
entity_name: job
|
||||
# Definition for retryable codes.
|
||||
retry_codes_def:
|
||||
- name: idempotent
|
||||
retry_codes:
|
||||
- DEADLINE_EXCEEDED
|
||||
- UNAVAILABLE
|
||||
- name: non_idempotent
|
||||
retry_codes: []
|
||||
# Definition for retry/backoff parameters.
|
||||
retry_params_def:
|
||||
- name: default
|
||||
initial_retry_delay_millis: 100
|
||||
retry_delay_multiplier: 1.3
|
||||
max_retry_delay_millis: 60000
|
||||
initial_rpc_timeout_millis: 20000
|
||||
rpc_timeout_multiplier: 1
|
||||
max_rpc_timeout_millis: 20000
|
||||
total_timeout_millis: 600000
|
||||
# A list of method configurations.
|
||||
# Common properties:
|
||||
#
|
||||
# name - The simple name of the method.
|
||||
#
|
||||
# flattening - Specifies the configuration for parameter flattening.
|
||||
# Describes the parameter groups for which a generator should produce method
|
||||
# overloads which allow a client to directly pass request message fields as
|
||||
# method parameters. This information may or may not be used, depending on
|
||||
# the target language.
|
||||
# Consists of groups, which each represent a list of parameters to be
|
||||
# flattened. Each parameter listed must be a field of the request message.
|
||||
#
|
||||
# required_fields - Fields that are always required for a request to be
|
||||
# valid.
|
||||
#
|
||||
# resource_name_treatment - An enum that specifies how to treat the resource
|
||||
# name formats defined in the field_name_patterns and
|
||||
# response_field_name_patterns fields.
|
||||
# UNSET: default value
|
||||
# NONE: the collection configs will not be used by the generated code.
|
||||
# VALIDATE: string fields will be validated by the client against the
|
||||
# specified resource name formats.
|
||||
# STATIC_TYPES: the client will use generated types for resource names.
|
||||
#
|
||||
# page_streaming - Specifies the configuration for paging.
|
||||
# Describes information for generating a method which transforms a paging
|
||||
# list RPC into a stream of resources.
|
||||
# Consists of a request and a response.
|
||||
# The request specifies request information of the list method. It defines
|
||||
# which fields match the paging pattern in the request. The request consists
|
||||
# of a page_size_field and a token_field. The page_size_field is the name of
|
||||
# the optional field specifying the maximum number of elements to be
|
||||
# returned in the response. The token_field is the name of the field in the
|
||||
# request containing the page token.
|
||||
# The response specifies response information of the list method. It defines
|
||||
# which fields match the paging pattern in the response. The response
|
||||
# consists of a token_field and a resources_field. The token_field is the
|
||||
# name of the field in the response containing the next page token. The
|
||||
# resources_field is the name of the field in the response containing the
|
||||
# list of resources belonging to the page.
|
||||
#
|
||||
# retry_codes_name - Specifies the configuration for retryable codes. The
|
||||
# name must be defined in interfaces.retry_codes_def.
|
||||
#
|
||||
# retry_params_name - Specifies the configuration for retry/backoff
|
||||
# parameters. The name must be defined in interfaces.retry_params_def.
|
||||
#
|
||||
# field_name_patterns - Maps the field name of the request type to
|
||||
# entity_name of interfaces.collections.
|
||||
# Specifies the string pattern that the field must follow.
|
||||
#
|
||||
# timeout_millis - Specifies the default timeout for a non-retrying call. If
|
||||
# the call is retrying, refer to retry_params_name instead.
|
||||
methods:
|
||||
- name: ListJobs
|
||||
resource_name_treatment: STATIC_TYPES
|
||||
flattening:
|
||||
groups:
|
||||
- parameters:
|
||||
- parent
|
||||
required_fields:
|
||||
- parent
|
||||
page_streaming:
|
||||
request:
|
||||
page_size_field: page_size
|
||||
token_field: page_token
|
||||
response:
|
||||
token_field: next_page_token
|
||||
resources_field: jobs
|
||||
retry_codes_name: idempotent
|
||||
retry_params_name: default
|
||||
field_name_patterns:
|
||||
parent: location
|
||||
timeout_millis: 10000
|
||||
- name: GetJob
|
||||
resource_name_treatment: STATIC_TYPES
|
||||
flattening:
|
||||
groups:
|
||||
- parameters:
|
||||
- name
|
||||
required_fields:
|
||||
- name
|
||||
retry_codes_name: idempotent
|
||||
retry_params_name: default
|
||||
field_name_patterns:
|
||||
name: job
|
||||
timeout_millis: 10000
|
||||
- name: CreateJob
|
||||
resource_name_treatment: STATIC_TYPES
|
||||
flattening:
|
||||
groups:
|
||||
- parameters:
|
||||
- parent
|
||||
- job
|
||||
required_fields:
|
||||
- parent
|
||||
- job
|
||||
retry_codes_name: non_idempotent
|
||||
retry_params_name: default
|
||||
field_name_patterns:
|
||||
parent: location
|
||||
timeout_millis: 10000
|
||||
- name: UpdateJob
|
||||
resource_name_treatment: STATIC_TYPES
|
||||
flattening:
|
||||
groups:
|
||||
- parameters:
|
||||
- job
|
||||
- update_mask
|
||||
required_fields:
|
||||
- job
|
||||
retry_codes_name: non_idempotent
|
||||
retry_params_name: default
|
||||
field_name_patterns:
|
||||
job.name: job
|
||||
timeout_millis: 10000
|
||||
- name: DeleteJob
|
||||
resource_name_treatment: STATIC_TYPES
|
||||
flattening:
|
||||
groups:
|
||||
- parameters:
|
||||
- name
|
||||
required_fields:
|
||||
- name
|
||||
retry_codes_name: idempotent
|
||||
retry_params_name: default
|
||||
field_name_patterns:
|
||||
name: job
|
||||
timeout_millis: 10000
|
||||
- name: PauseJob
|
||||
resource_name_treatment: STATIC_TYPES
|
||||
flattening:
|
||||
groups:
|
||||
- parameters:
|
||||
- name
|
||||
required_fields:
|
||||
- name
|
||||
retry_codes_name: idempotent
|
||||
retry_params_name: default
|
||||
field_name_patterns:
|
||||
name: job
|
||||
timeout_millis: 10000
|
||||
- name: ResumeJob
|
||||
resource_name_treatment: STATIC_TYPES
|
||||
flattening:
|
||||
groups:
|
||||
- parameters:
|
||||
- name
|
||||
required_fields:
|
||||
- name
|
||||
retry_codes_name: idempotent
|
||||
retry_params_name: default
|
||||
field_name_patterns:
|
||||
name: job
|
||||
timeout_millis: 10000
|
||||
- name: RunJob
|
||||
resource_name_treatment: STATIC_TYPES
|
||||
flattening:
|
||||
groups:
|
||||
- parameters:
|
||||
- name
|
||||
required_fields:
|
||||
- name
|
||||
retry_codes_name: non_idempotent
|
||||
retry_params_name: default
|
||||
field_name_patterns:
|
||||
name: job
|
||||
timeout_millis: 10000
|
||||
resource_name_generation:
|
||||
- message_name: Job
|
||||
field_entity_map:
|
||||
name: job
|
||||
- message_name: ListJobsRequest
|
||||
field_entity_map:
|
||||
parent: location
|
||||
- message_name: GetJobRequest
|
||||
field_entity_map:
|
||||
name: job
|
||||
- message_name: CreateJobRequest
|
||||
field_entity_map:
|
||||
parent: location
|
||||
- message_name: UpdateJobRequest
|
||||
field_entity_map:
|
||||
job.name: job
|
||||
- message_name: DeleteJobRequest
|
||||
field_entity_map:
|
||||
name: job
|
||||
- message_name: PauseJobRequest
|
||||
field_entity_map:
|
||||
name: job
|
||||
- message_name: ResumeJobRequest
|
||||
field_entity_map:
|
||||
name: job
|
||||
- message_name: RunJobRequest
|
||||
field_entity_map:
|
||||
name: job
|
||||
|
|
|
|||
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"methodConfig": [
|
||||
{
|
||||
"name": [
|
||||
{
|
||||
"service": "google.cloud.scheduler.v1beta1.CloudScheduler",
|
||||
"method": "ListJobs"
|
||||
},
|
||||
{
|
||||
"service": "google.cloud.scheduler.v1beta1.CloudScheduler",
|
||||
"method": "GetJob"
|
||||
},
|
||||
{
|
||||
"service": "google.cloud.scheduler.v1beta1.CloudScheduler",
|
||||
"method": "DeleteJob"
|
||||
},
|
||||
{
|
||||
"service": "google.cloud.scheduler.v1beta1.CloudScheduler",
|
||||
"method": "PauseJob"
|
||||
},
|
||||
{
|
||||
"service": "google.cloud.scheduler.v1beta1.CloudScheduler",
|
||||
"method": "ResumeJob"
|
||||
}
|
||||
],
|
||||
"timeout": "600s",
|
||||
"retryPolicy": {
|
||||
"initialBackoff": "0.100s",
|
||||
"maxBackoff": "60s",
|
||||
"backoffMultiplier": 1.3,
|
||||
"retryableStatusCodes": [
|
||||
"DEADLINE_EXCEEDED",
|
||||
"UNAVAILABLE"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": [
|
||||
{
|
||||
"service": "google.cloud.scheduler.v1beta1.CloudScheduler",
|
||||
"method": "CreateJob"
|
||||
},
|
||||
{
|
||||
"service": "google.cloud.scheduler.v1beta1.CloudScheduler",
|
||||
"method": "UpdateJob"
|
||||
},
|
||||
{
|
||||
"service": "google.cloud.scheduler.v1beta1.CloudScheduler",
|
||||
"method": "RunJob"
|
||||
}
|
||||
],
|
||||
"timeout": "600s"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -17,12 +17,12 @@ syntax = "proto3";
|
|||
|
||||
package google.cloud.scheduler.v1beta1;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/resource.proto";
|
||||
import "google/cloud/scheduler/v1beta1/target.proto";
|
||||
import "google/protobuf/duration.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/rpc/status.proto";
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option go_package = "google.golang.org/genproto/googleapis/cloud/scheduler/v1beta1;scheduler";
|
||||
option java_multiple_files = true;
|
||||
|
|
@ -32,6 +32,11 @@ option java_package = "com.google.cloud.scheduler.v1beta1";
|
|||
// Configuration for a job.
|
||||
// The maximum allowed size for a job is 100KB.
|
||||
message Job {
|
||||
option (google.api.resource) = {
|
||||
type: "cloudscheduler.googleapis.com/Job"
|
||||
pattern: "projects/{project}/locations/{location}/jobs/{job}"
|
||||
};
|
||||
|
||||
// State of the job.
|
||||
enum State {
|
||||
// Unspecified state.
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ syntax = "proto3";
|
|||
|
||||
package google.cloud.scheduler.v1beta1;
|
||||
|
||||
import "google/api/resource.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
|
||||
option go_package = "google.golang.org/genproto/googleapis/cloud/scheduler/v1beta1;scheduler";
|
||||
option java_multiple_files = true;
|
||||
|
|
@ -32,9 +32,7 @@ option java_package = "com.google.cloud.scheduler.v1beta1";
|
|||
// constitutes a failed execution. For a redirected request, the response
|
||||
// returned by the redirected request is considered.
|
||||
message HttpTarget {
|
||||
// Required.
|
||||
//
|
||||
// The full URI path that the request will be sent to. This string
|
||||
// Required. The full URI path that the request will be sent to. This string
|
||||
// must begin with either "http://" or "https://". Some examples of
|
||||
// valid values for [uri][google.cloud.scheduler.v1beta1.HttpTarget.uri] are:
|
||||
// `http://acme.com` and `https://acme.com/sales:8080`. Cloud Scheduler will
|
||||
|
|
@ -77,8 +75,8 @@ message HttpTarget {
|
|||
// will be generated and attached as an `Authorization` header in the HTTP
|
||||
// request.
|
||||
//
|
||||
// This type of authorization should be used when sending requests to a GCP
|
||||
// endpoint.
|
||||
// This type of authorization should generally only be used when calling
|
||||
// Google APIs hosted on *.googleapis.com.
|
||||
OAuthToken oauth_token = 5;
|
||||
|
||||
// If specified, an
|
||||
|
|
@ -86,8 +84,9 @@ message HttpTarget {
|
|||
// token will be generated and attached as an `Authorization` header in the
|
||||
// HTTP request.
|
||||
//
|
||||
// This type of authorization should be used when sending requests to third
|
||||
// party endpoints.
|
||||
// This type of authorization can be used for many scenarios, including
|
||||
// calling Cloud Run, or endpoints where you intend to validate the token
|
||||
// yourself.
|
||||
OidcToken oidc_token = 6;
|
||||
}
|
||||
}
|
||||
|
|
@ -162,16 +161,16 @@ message AppEngineHttpTarget {
|
|||
// Pub/Sub target. The job will be delivered by publishing a message to
|
||||
// the given Pub/Sub topic.
|
||||
message PubsubTarget {
|
||||
// Required.
|
||||
//
|
||||
// The name of the Cloud Pub/Sub topic to which messages will
|
||||
// Required. The name of the Cloud Pub/Sub topic to which messages will
|
||||
// be published when a job is delivered. The topic name must be in the
|
||||
// same format as required by PubSub's
|
||||
// [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
|
||||
// for example `projects/PROJECT_ID/topics/TOPIC_ID`.
|
||||
//
|
||||
// The topic must be in the same project as the Cloud Scheduler job.
|
||||
string topic_name = 1;
|
||||
string topic_name = 1 [(google.api.resource_reference) = {
|
||||
type: "pubsub.googleapis.com/Topic"
|
||||
}];
|
||||
|
||||
// The message payload for PubsubMessage.
|
||||
//
|
||||
|
|
@ -315,8 +314,8 @@ enum HttpMethod {
|
|||
|
||||
// Contains information needed for generating an
|
||||
// [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
|
||||
// This type of authorization should be used when sending requests to a GCP
|
||||
// endpoint.
|
||||
// This type of authorization should generally only be used when calling Google
|
||||
// APIs hosted on *.googleapis.com.
|
||||
message OAuthToken {
|
||||
// [Service account email](https://cloud.google.com/iam/docs/service-accounts)
|
||||
// to be used for generating OAuth token.
|
||||
|
|
@ -332,9 +331,10 @@ message OAuthToken {
|
|||
|
||||
// Contains information needed for generating an
|
||||
// [OpenID Connect
|
||||
// token](https://developers.google.com/identity/protocols/OpenIDConnect). This
|
||||
// type of authorization should be used when sending requests to third party
|
||||
// endpoints.
|
||||
// token](https://developers.google.com/identity/protocols/OpenIDConnect).
|
||||
// This type of authorization can be used for many scenarios, including
|
||||
// calling Cloud Run, or endpoints where you intend to validate the token
|
||||
// yourself.
|
||||
message OidcToken {
|
||||
// [Service account email](https://cloud.google.com/iam/docs/service-accounts)
|
||||
// to be used for generating OIDC token.
|
||||
|
|
@ -346,3 +346,11 @@ message OidcToken {
|
|||
// specified in target will be used.
|
||||
string audience = 2;
|
||||
}
|
||||
|
||||
// The Pub/Sub Topic resource definition is in google/cloud/pubsub/v1/,
|
||||
// but we do not import that proto directly; therefore, we redefine the
|
||||
// pattern here.
|
||||
option (google.api.resource_definition) = {
|
||||
type: "pubsub.googleapis.com/Topic"
|
||||
pattern: "projects/{project}/topics/{topic}"
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue