google-cloud-run-v2 0.10.1 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/run/v2/condition_pb.rb +1 -1
- data/lib/google/cloud/run/v2/execution_pb.rb +2 -1
- data/lib/google/cloud/run/v2/execution_services_pb.rb +2 -0
- data/lib/google/cloud/run/v2/executions/client.rb +125 -7
- data/lib/google/cloud/run/v2/executions/operations.rb +10 -1
- data/lib/google/cloud/run/v2/executions/rest/client.rb +167 -6
- data/lib/google/cloud/run/v2/executions/rest/operations.rb +98 -0
- data/lib/google/cloud/run/v2/executions/rest/service_stub.rb +60 -0
- data/lib/google/cloud/run/v2/job_pb.rb +8 -1
- data/lib/google/cloud/run/v2/jobs/client.rb +44 -14
- data/lib/google/cloud/run/v2/jobs/operations.rb +10 -1
- data/lib/google/cloud/run/v2/jobs/rest/client.rb +180 -1
- data/lib/google/cloud/run/v2/jobs/rest/operations.rb +98 -0
- data/lib/google/cloud/run/v2/k8s.min_pb.rb +3 -1
- data/lib/google/cloud/run/v2/revisions/client.rb +10 -1
- data/lib/google/cloud/run/v2/revisions/operations.rb +10 -1
- data/lib/google/cloud/run/v2/revisions/rest/client.rb +59 -0
- data/lib/google/cloud/run/v2/revisions/rest/operations.rb +98 -0
- data/lib/google/cloud/run/v2/services/client.rb +10 -1
- data/lib/google/cloud/run/v2/services/operations.rb +10 -1
- data/lib/google/cloud/run/v2/services/rest/client.rb +153 -0
- data/lib/google/cloud/run/v2/services/rest/operations.rb +98 -0
- data/lib/google/cloud/run/v2/task_pb.rb +1 -1
- data/lib/google/cloud/run/v2/tasks/client.rb +10 -1
- data/lib/google/cloud/run/v2/tasks/rest/client.rb +36 -0
- data/lib/google/cloud/run/v2/vendor_settings_pb.rb +3 -1
- data/lib/google/cloud/run/v2/version.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/cloud/run/v2/condition.rb +3 -0
- data/proto_docs/google/cloud/run/v2/execution.rb +26 -6
- data/proto_docs/google/cloud/run/v2/job.rb +42 -0
- data/proto_docs/google/cloud/run/v2/k8s.min.rb +44 -4
- data/proto_docs/google/cloud/run/v2/task.rb +7 -2
- data/proto_docs/google/cloud/run/v2/vendor_settings.rb +33 -5
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4185c709f3d4535c1d850f277b3247ce35bcf5b0e31261ea39e9a89aa042aae
|
4
|
+
data.tar.gz: 163386cf2caeac6d4ece1e8cbe361d32a1864e514d81c163adeb12d36af3e54c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dae0e72d463430f9250febd14c29c78cadb7053b15b6e35239a7a28bff34ffaa7615693a570505c6399d8ac53e1c0f5dc8b74a2e6d2be4778ded46884d8bc25d
|
7
|
+
data.tar.gz: c4b177b0566ddb605fa7b92273ac6be3fa4bfc6c69dc6a38e53a3f57a4efe0efc36aee83ad6b1caa6aeedf4f2d12d48bbf8bae5857a61115402764abf4097cff
|
@@ -7,7 +7,7 @@ require 'google/protobuf'
|
|
7
7
|
require 'google/protobuf/timestamp_pb'
|
8
8
|
|
9
9
|
|
10
|
-
descriptor_data = "\n#google/cloud/run/v2/condition.proto\x12\x13google.cloud.run.v2\x1a\x1fgoogle/protobuf/timestamp.proto\"\
|
10
|
+
descriptor_data = "\n#google/cloud/run/v2/condition.proto\x12\x13google.cloud.run.v2\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9d\x0c\n\tCondition\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x33\n\x05state\x18\x02 \x01(\x0e\x32$.google.cloud.run.v2.Condition.State\x12\x0f\n\x07message\x18\x03 \x01(\t\x12\x38\n\x14last_transition_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x39\n\x08severity\x18\x05 \x01(\x0e\x32\'.google.cloud.run.v2.Condition.Severity\x12=\n\x06reason\x18\x06 \x01(\x0e\x32+.google.cloud.run.v2.Condition.CommonReasonH\x00\x12H\n\x0frevision_reason\x18\t \x01(\x0e\x32-.google.cloud.run.v2.Condition.RevisionReasonH\x00\x12J\n\x10\x65xecution_reason\x18\x0b \x01(\x0e\x32..google.cloud.run.v2.Condition.ExecutionReasonH\x00\"\x7f\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x43ONDITION_PENDING\x10\x01\x12\x19\n\x15\x43ONDITION_RECONCILING\x10\x02\x12\x14\n\x10\x43ONDITION_FAILED\x10\x03\x12\x17\n\x13\x43ONDITION_SUCCEEDED\x10\x04\"F\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\t\n\x05\x45RROR\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\x08\n\x04INFO\x10\x03\"\xb2\x03\n\x0c\x43ommonReason\x12\x1b\n\x17\x43OMMON_REASON_UNDEFINED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x13\n\x0fREVISION_FAILED\x10\x03\x12\x1e\n\x1aPROGRESS_DEADLINE_EXCEEDED\x10\x04\x12\x15\n\x11\x43ONTAINER_MISSING\x10\x06\x12\x1f\n\x1b\x43ONTAINER_PERMISSION_DENIED\x10\x07\x12 \n\x1c\x43ONTAINER_IMAGE_UNAUTHORIZED\x10\x08\x12.\n*CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED\x10\t\x12$\n ENCRYPTION_KEY_PERMISSION_DENIED\x10\n\x12\x1f\n\x1b\x45NCRYPTION_KEY_CHECK_FAILED\x10\x0b\x12\x1f\n\x1bSECRETS_ACCESS_CHECK_FAILED\x10\x0c\x12\x19\n\x15WAITING_FOR_OPERATION\x10\r\x12\x13\n\x0fIMMEDIATE_RETRY\x10\x0e\x12\x13\n\x0fPOSTPONED_RETRY\x10\x0f\x12\x0c\n\x08INTERNAL\x10\x10\"\xca\x02\n\x0eRevisionReason\x12\x1d\n\x19REVISION_REASON_UNDEFINED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RESERVE\x10\x02\x12\x0b\n\x07RETIRED\x10\x03\x12\x0c\n\x08RETIRING\x10\x04\x12\x0e\n\nRECREATING\x10\x05\x12 \n\x1cHEALTH_CHECK_CONTAINER_ERROR\x10\x06\x12$\n CUSTOMIZED_PATH_RESPONSE_PENDING\x10\x07\x12!\n\x1dMIN_INSTANCES_NOT_PROVISIONED\x10\x08\x12!\n\x1d\x41\x43TIVE_REVISION_LIMIT_REACHED\x10\t\x12\x11\n\rNO_DEPLOYMENT\x10\n\x12\x18\n\x14HEALTH_CHECK_SKIPPED\x10\x0b\x12\x19\n\x15MIN_INSTANCES_WARMING\x10\x0c\"\x9b\x01\n\x0f\x45xecutionReason\x12\x1e\n\x1a\x45XECUTION_REASON_UNDEFINED\x10\x00\x12$\n JOB_STATUS_SERVICE_POLLING_ERROR\x10\x01\x12\x16\n\x12NON_ZERO_EXIT_CODE\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\x0b\n\x07\x44\x45LETED\x10\x05\x42\t\n\x07reasonsBV\n\x17\x63om.google.cloud.run.v2B\x0e\x43onditionProtoP\x01Z)cloud.google.com/go/run/apiv2/runpb;runpbb\x06proto3"
|
11
11
|
|
12
12
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
13
13
|
|
@@ -15,7 +15,7 @@ require 'google/longrunning/operations_pb'
|
|
15
15
|
require 'google/protobuf/timestamp_pb'
|
16
16
|
|
17
17
|
|
18
|
-
descriptor_data = "\n#google/cloud/run/v2/execution.proto\x12\x13google.cloud.run.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1dgoogle/api/launch_stage.proto\x1a\x19google/api/resource.proto\x1a#google/cloud/run/v2/condition.proto\x1a\'google/cloud/run/v2/task_template.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"I\n\x13GetExecutionRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1crun.googleapis.com/Execution\"\x8a\x01\n\x15ListExecutionsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\x12\x1crun.googleapis.com/Execution\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x14\n\x0cshow_deleted\x18\x04 \x01(\x08\"e\n\x16ListExecutionsResponse\x12\x32\n\nexecutions\x18\x01 \x03(\x0b\x32\x1e.google.cloud.run.v2.Execution\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"q\n\x16\x44\x65leteExecutionRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1crun.googleapis.com/Execution\x12\x15\n\rvalidate_only\x18\x02 \x01(\x08\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\"\x82\n\n\tExecution\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\ngeneration\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12?\n\x06labels\x18\x04 \x03(\x0b\x32*.google.cloud.run.v2.Execution.LabelsEntryB\x03\xe0\x41\x03\x12I\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32/.google.cloud.run.v2.Execution.AnnotationsEntryB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x16 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x38\n\x0f\x63ompletion_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12-\n\x0claunch_stage\x18\x0b \x01(\x0e\x32\x17.google.api.LaunchStage\x12+\n\x03job\x18\x0c \x01(\tB\x1e\xe0\x41\x03\xfa\x41\x18\n\x16run.googleapis.com/Job\x12\x18\n\x0bparallelism\x18\r \x01(\x05\x42\x03\xe0\x41\x03\x12\x17\n\ntask_count\x18\x0e \x01(\x05\x42\x03\xe0\x41\x03\x12\x38\n\x08template\x18\x0f \x01(\x0b\x32!.google.cloud.run.v2.TaskTemplateB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\x10 \x01(\x08\x42\x03\xe0\x41\x03\x12\x37\n\nconditions\x18\x11 \x03(\x0b\x32\x1e.google.cloud.run.v2.ConditionB\x03\xe0\x41\x03\x12 \n\x13observed_generation\x18\x12 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1a\n\rrunning_count\x18\x13 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1c\n\x0fsucceeded_count\x18\x14 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x66\x61iled_count\x18\x15 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1c\n\x0f\x63\x61ncelled_count\x18\x18 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1a\n\rretried_count\x18\x19 \x01(\x05\x42\x03\xe0\x41\x03\x12\x14\n\x07log_uri\x18\x1a \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x1b \x01(\x08\x42\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x63 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:o\xea\x41l\n\x1crun.googleapis.com/Execution\x12Iprojects/{project}/locations/{location}/jobs/{job}/executions/{execution}R\x01\x01\x32\
|
18
|
+
descriptor_data = "\n#google/cloud/run/v2/execution.proto\x12\x13google.cloud.run.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1dgoogle/api/launch_stage.proto\x1a\x19google/api/resource.proto\x1a#google/cloud/run/v2/condition.proto\x1a\'google/cloud/run/v2/task_template.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"I\n\x13GetExecutionRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1crun.googleapis.com/Execution\"\x8a\x01\n\x15ListExecutionsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\x12\x1crun.googleapis.com/Execution\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x14\n\x0cshow_deleted\x18\x04 \x01(\x08\"e\n\x16ListExecutionsResponse\x12\x32\n\nexecutions\x18\x01 \x03(\x0b\x32\x1e.google.cloud.run.v2.Execution\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"q\n\x16\x44\x65leteExecutionRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1crun.googleapis.com/Execution\x12\x15\n\rvalidate_only\x18\x02 \x01(\x08\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\"q\n\x16\x43\x61ncelExecutionRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1crun.googleapis.com/Execution\x12\x15\n\rvalidate_only\x18\x02 \x01(\x08\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\"\x82\n\n\tExecution\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\ngeneration\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12?\n\x06labels\x18\x04 \x03(\x0b\x32*.google.cloud.run.v2.Execution.LabelsEntryB\x03\xe0\x41\x03\x12I\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32/.google.cloud.run.v2.Execution.AnnotationsEntryB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x16 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x38\n\x0f\x63ompletion_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12-\n\x0claunch_stage\x18\x0b \x01(\x0e\x32\x17.google.api.LaunchStage\x12+\n\x03job\x18\x0c \x01(\tB\x1e\xe0\x41\x03\xfa\x41\x18\n\x16run.googleapis.com/Job\x12\x18\n\x0bparallelism\x18\r \x01(\x05\x42\x03\xe0\x41\x03\x12\x17\n\ntask_count\x18\x0e \x01(\x05\x42\x03\xe0\x41\x03\x12\x38\n\x08template\x18\x0f \x01(\x0b\x32!.google.cloud.run.v2.TaskTemplateB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\x10 \x01(\x08\x42\x03\xe0\x41\x03\x12\x37\n\nconditions\x18\x11 \x03(\x0b\x32\x1e.google.cloud.run.v2.ConditionB\x03\xe0\x41\x03\x12 \n\x13observed_generation\x18\x12 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1a\n\rrunning_count\x18\x13 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1c\n\x0fsucceeded_count\x18\x14 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x66\x61iled_count\x18\x15 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1c\n\x0f\x63\x61ncelled_count\x18\x18 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1a\n\rretried_count\x18\x19 \x01(\x05\x42\x03\xe0\x41\x03\x12\x14\n\x07log_uri\x18\x1a \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x1b \x01(\x08\x42\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x63 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:o\xea\x41l\n\x1crun.googleapis.com/Execution\x12Iprojects/{project}/locations/{location}/jobs/{job}/executions/{execution}R\x01\x01\x32\xb1\x06\n\nExecutions\x12\x9e\x01\n\x0cGetExecution\x12(.google.cloud.run.v2.GetExecutionRequest\x1a\x1e.google.cloud.run.v2.Execution\"D\x82\xd3\xe4\x93\x02\x37\x12\x35/v2/{name=projects/*/locations/*/jobs/*/executions/*}\xda\x41\x04name\x12\xb1\x01\n\x0eListExecutions\x12*.google.cloud.run.v2.ListExecutionsRequest\x1a+.google.cloud.run.v2.ListExecutionsResponse\"F\x82\xd3\xe4\x93\x02\x37\x12\x35/v2/{parent=projects/*/locations/*/jobs/*}/executions\xda\x41\x06parent\x12\xbc\x01\n\x0f\x44\x65leteExecution\x12+.google.cloud.run.v2.DeleteExecutionRequest\x1a\x1d.google.longrunning.Operation\"]\x82\xd3\xe4\x93\x02\x37*5/v2/{name=projects/*/locations/*/jobs/*/executions/*}\xda\x41\x04name\xca\x41\x16\n\tExecution\x12\tExecution\x12\xc6\x01\n\x0f\x43\x61ncelExecution\x12+.google.cloud.run.v2.CancelExecutionRequest\x1a\x1d.google.longrunning.Operation\"g\x82\xd3\xe4\x93\x02\x41\"</v2/{name=projects/*/locations/*/jobs/*/executions/*}:cancel:\x01*\xda\x41\x04name\xca\x41\x16\n\tExecution\x12\tExecution\x1a\x46\xca\x41\x12run.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBV\n\x17\x63om.google.cloud.run.v2B\x0e\x45xecutionProtoP\x01Z)cloud.google.com/go/run/apiv2/runpb;runpbb\x06proto3"
|
19
19
|
|
20
20
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
21
21
|
|
@@ -52,6 +52,7 @@ module Google
|
|
52
52
|
ListExecutionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.ListExecutionsRequest").msgclass
|
53
53
|
ListExecutionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.ListExecutionsResponse").msgclass
|
54
54
|
DeleteExecutionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.DeleteExecutionRequest").msgclass
|
55
|
+
CancelExecutionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.CancelExecutionRequest").msgclass
|
55
56
|
Execution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.Execution").msgclass
|
56
57
|
end
|
57
58
|
end
|
@@ -39,6 +39,8 @@ module Google
|
|
39
39
|
rpc :ListExecutions, ::Google::Cloud::Run::V2::ListExecutionsRequest, ::Google::Cloud::Run::V2::ListExecutionsResponse
|
40
40
|
# Deletes an Execution.
|
41
41
|
rpc :DeleteExecution, ::Google::Cloud::Run::V2::DeleteExecutionRequest, ::Google::Longrunning::Operation
|
42
|
+
# Cancels an Execution.
|
43
|
+
rpc :CancelExecution, ::Google::Cloud::Run::V2::CancelExecutionRequest, ::Google::Longrunning::Operation
|
42
44
|
end
|
43
45
|
|
44
46
|
Stub = Service.rpc_stub_class
|
@@ -151,7 +151,8 @@ module Google
|
|
151
151
|
credentials: credentials,
|
152
152
|
endpoint: @config.endpoint,
|
153
153
|
channel_args: @config.channel_args,
|
154
|
-
interceptors: @config.interceptors
|
154
|
+
interceptors: @config.interceptors,
|
155
|
+
channel_pool_config: @config.channel_pool
|
155
156
|
)
|
156
157
|
end
|
157
158
|
|
@@ -192,8 +193,8 @@ module Google
|
|
192
193
|
# @param name [::String]
|
193
194
|
# Required. The full name of the Execution.
|
194
195
|
# Format:
|
195
|
-
# projects
|
196
|
-
# where
|
196
|
+
# `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`,
|
197
|
+
# where `{project}` can be project id or number.
|
197
198
|
#
|
198
199
|
# @yield [response, operation] Access the result along with the RPC operation
|
199
200
|
# @yieldparam response [::Google::Cloud::Run::V2::Execution]
|
@@ -280,8 +281,8 @@ module Google
|
|
280
281
|
# @param parent [::String]
|
281
282
|
# Required. The Execution from which the Executions should be listed.
|
282
283
|
# To list all Executions across Jobs, use "-" instead of Job name.
|
283
|
-
# Format: projects
|
284
|
-
# can be project id or number.
|
284
|
+
# Format: `projects/{project}/locations/{location}/jobs/{job}`, where
|
285
|
+
# `{project}` can be project id or number.
|
285
286
|
# @param page_size [::Integer]
|
286
287
|
# Maximum number of Executions to return in this call.
|
287
288
|
# @param page_token [::String]
|
@@ -380,8 +381,8 @@ module Google
|
|
380
381
|
# @param name [::String]
|
381
382
|
# Required. The name of the Execution to delete.
|
382
383
|
# Format:
|
383
|
-
# projects
|
384
|
-
# where
|
384
|
+
# `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`,
|
385
|
+
# where `{project}` can be project id or number.
|
385
386
|
# @param validate_only [::Boolean]
|
386
387
|
# Indicates that the request should be validated without actually
|
387
388
|
# deleting any resources.
|
@@ -461,6 +462,108 @@ module Google
|
|
461
462
|
raise ::Google::Cloud::Error.from_error(e)
|
462
463
|
end
|
463
464
|
|
465
|
+
##
|
466
|
+
# Cancels an Execution.
|
467
|
+
#
|
468
|
+
# @overload cancel_execution(request, options = nil)
|
469
|
+
# Pass arguments to `cancel_execution` via a request object, either of type
|
470
|
+
# {::Google::Cloud::Run::V2::CancelExecutionRequest} or an equivalent Hash.
|
471
|
+
#
|
472
|
+
# @param request [::Google::Cloud::Run::V2::CancelExecutionRequest, ::Hash]
|
473
|
+
# A request object representing the call parameters. Required. To specify no
|
474
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
475
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
476
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
477
|
+
#
|
478
|
+
# @overload cancel_execution(name: nil, validate_only: nil, etag: nil)
|
479
|
+
# Pass arguments to `cancel_execution` via keyword arguments. Note that at
|
480
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
481
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
482
|
+
#
|
483
|
+
# @param name [::String]
|
484
|
+
# Required. The name of the Execution to cancel.
|
485
|
+
# Format:
|
486
|
+
# `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`,
|
487
|
+
# where `{project}` can be project id or number.
|
488
|
+
# @param validate_only [::Boolean]
|
489
|
+
# Indicates that the request should be validated without actually
|
490
|
+
# cancelling any resources.
|
491
|
+
# @param etag [::String]
|
492
|
+
# A system-generated fingerprint for this version of the resource.
|
493
|
+
# This may be used to detect modification conflict during updates.
|
494
|
+
#
|
495
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
496
|
+
# @yieldparam response [::Gapic::Operation]
|
497
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
498
|
+
#
|
499
|
+
# @return [::Gapic::Operation]
|
500
|
+
#
|
501
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
502
|
+
#
|
503
|
+
# @example Basic example
|
504
|
+
# require "google/cloud/run/v2"
|
505
|
+
#
|
506
|
+
# # Create a client object. The client can be reused for multiple calls.
|
507
|
+
# client = Google::Cloud::Run::V2::Executions::Client.new
|
508
|
+
#
|
509
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
510
|
+
# request = Google::Cloud::Run::V2::CancelExecutionRequest.new
|
511
|
+
#
|
512
|
+
# # Call the cancel_execution method.
|
513
|
+
# result = client.cancel_execution request
|
514
|
+
#
|
515
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
516
|
+
# # check the status of an operation, cancel it, or wait for results.
|
517
|
+
# # Here is how to wait for a response.
|
518
|
+
# result.wait_until_done! timeout: 60
|
519
|
+
# if result.response?
|
520
|
+
# p result.response
|
521
|
+
# else
|
522
|
+
# puts "No response received."
|
523
|
+
# end
|
524
|
+
#
|
525
|
+
def cancel_execution request, options = nil
|
526
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
527
|
+
|
528
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Run::V2::CancelExecutionRequest
|
529
|
+
|
530
|
+
# Converts hash and nil to an options object
|
531
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
532
|
+
|
533
|
+
# Customize the options with defaults
|
534
|
+
metadata = @config.rpcs.cancel_execution.metadata.to_h
|
535
|
+
|
536
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
537
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
538
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
539
|
+
gapic_version: ::Google::Cloud::Run::V2::VERSION
|
540
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
541
|
+
|
542
|
+
header_params = {}
|
543
|
+
if request.name
|
544
|
+
header_params["name"] = request.name
|
545
|
+
end
|
546
|
+
|
547
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
548
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
549
|
+
|
550
|
+
options.apply_defaults timeout: @config.rpcs.cancel_execution.timeout,
|
551
|
+
metadata: metadata,
|
552
|
+
retry_policy: @config.rpcs.cancel_execution.retry_policy
|
553
|
+
|
554
|
+
options.apply_defaults timeout: @config.timeout,
|
555
|
+
metadata: @config.metadata,
|
556
|
+
retry_policy: @config.retry_policy
|
557
|
+
|
558
|
+
@executions_stub.call_rpc :cancel_execution, request, options: options do |response, operation|
|
559
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
560
|
+
yield response, operation if block_given?
|
561
|
+
return response
|
562
|
+
end
|
563
|
+
rescue ::GRPC::BadStatus => e
|
564
|
+
raise ::Google::Cloud::Error.from_error(e)
|
565
|
+
end
|
566
|
+
|
464
567
|
##
|
465
568
|
# Configuration class for the Executions API.
|
466
569
|
#
|
@@ -580,6 +683,14 @@ module Google
|
|
580
683
|
end
|
581
684
|
end
|
582
685
|
|
686
|
+
##
|
687
|
+
# Configuration for the channel pool
|
688
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
689
|
+
#
|
690
|
+
def channel_pool
|
691
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
692
|
+
end
|
693
|
+
|
583
694
|
##
|
584
695
|
# Configuration RPC class for the Executions API.
|
585
696
|
#
|
@@ -613,6 +724,11 @@ module Google
|
|
613
724
|
# @return [::Gapic::Config::Method]
|
614
725
|
#
|
615
726
|
attr_reader :delete_execution
|
727
|
+
##
|
728
|
+
# RPC-specific configuration for `cancel_execution`
|
729
|
+
# @return [::Gapic::Config::Method]
|
730
|
+
#
|
731
|
+
attr_reader :cancel_execution
|
616
732
|
|
617
733
|
# @private
|
618
734
|
def initialize parent_rpcs = nil
|
@@ -622,6 +738,8 @@ module Google
|
|
622
738
|
@list_executions = ::Gapic::Config::Method.new list_executions_config
|
623
739
|
delete_execution_config = parent_rpcs.delete_execution if parent_rpcs.respond_to? :delete_execution
|
624
740
|
@delete_execution = ::Gapic::Config::Method.new delete_execution_config
|
741
|
+
cancel_execution_config = parent_rpcs.cancel_execution if parent_rpcs.respond_to? :cancel_execution
|
742
|
+
@cancel_execution = ::Gapic::Config::Method.new cancel_execution_config
|
625
743
|
|
626
744
|
yield self if block_given?
|
627
745
|
end
|
@@ -93,7 +93,8 @@ module Google
|
|
93
93
|
credentials: credentials,
|
94
94
|
endpoint: @config.endpoint,
|
95
95
|
channel_args: @config.channel_args,
|
96
|
-
interceptors: @config.interceptors
|
96
|
+
interceptors: @config.interceptors,
|
97
|
+
channel_pool_config: @config.channel_pool
|
97
98
|
)
|
98
99
|
|
99
100
|
# Used by an LRO wrapper for some methods of this service
|
@@ -709,6 +710,14 @@ module Google
|
|
709
710
|
end
|
710
711
|
end
|
711
712
|
|
713
|
+
##
|
714
|
+
# Configuration for the channel pool
|
715
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
716
|
+
#
|
717
|
+
def channel_pool
|
718
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
719
|
+
end
|
720
|
+
|
712
721
|
##
|
713
722
|
# Configuration RPC class for the Operations API.
|
714
723
|
#
|
@@ -183,8 +183,8 @@ module Google
|
|
183
183
|
# @param name [::String]
|
184
184
|
# Required. The full name of the Execution.
|
185
185
|
# Format:
|
186
|
-
# projects
|
187
|
-
# where
|
186
|
+
# `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`,
|
187
|
+
# where `{project}` can be project id or number.
|
188
188
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
189
189
|
# @yieldparam result [::Google::Cloud::Run::V2::Execution]
|
190
190
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -192,6 +192,22 @@ module Google
|
|
192
192
|
# @return [::Google::Cloud::Run::V2::Execution]
|
193
193
|
#
|
194
194
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
195
|
+
#
|
196
|
+
# @example Basic example
|
197
|
+
# require "google/cloud/run/v2"
|
198
|
+
#
|
199
|
+
# # Create a client object. The client can be reused for multiple calls.
|
200
|
+
# client = Google::Cloud::Run::V2::Executions::Rest::Client.new
|
201
|
+
#
|
202
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
203
|
+
# request = Google::Cloud::Run::V2::GetExecutionRequest.new
|
204
|
+
#
|
205
|
+
# # Call the get_execution method.
|
206
|
+
# result = client.get_execution request
|
207
|
+
#
|
208
|
+
# # The returned object is of type Google::Cloud::Run::V2::Execution.
|
209
|
+
# p result
|
210
|
+
#
|
195
211
|
def get_execution request, options = nil
|
196
212
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
197
213
|
|
@@ -248,8 +264,8 @@ module Google
|
|
248
264
|
# @param parent [::String]
|
249
265
|
# Required. The Execution from which the Executions should be listed.
|
250
266
|
# To list all Executions across Jobs, use "-" instead of Job name.
|
251
|
-
# Format: projects
|
252
|
-
# can be project id or number.
|
267
|
+
# Format: `projects/{project}/locations/{location}/jobs/{job}`, where
|
268
|
+
# `{project}` can be project id or number.
|
253
269
|
# @param page_size [::Integer]
|
254
270
|
# Maximum number of Executions to return in this call.
|
255
271
|
# @param page_token [::String]
|
@@ -264,6 +280,26 @@ module Google
|
|
264
280
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Run::V2::Execution>]
|
265
281
|
#
|
266
282
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
283
|
+
#
|
284
|
+
# @example Basic example
|
285
|
+
# require "google/cloud/run/v2"
|
286
|
+
#
|
287
|
+
# # Create a client object. The client can be reused for multiple calls.
|
288
|
+
# client = Google::Cloud::Run::V2::Executions::Rest::Client.new
|
289
|
+
#
|
290
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
291
|
+
# request = Google::Cloud::Run::V2::ListExecutionsRequest.new
|
292
|
+
#
|
293
|
+
# # Call the list_executions method.
|
294
|
+
# result = client.list_executions request
|
295
|
+
#
|
296
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
297
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
298
|
+
# result.each do |item|
|
299
|
+
# # Each element is of type ::Google::Cloud::Run::V2::Execution.
|
300
|
+
# p item
|
301
|
+
# end
|
302
|
+
#
|
267
303
|
def list_executions request, options = nil
|
268
304
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
269
305
|
|
@@ -321,8 +357,8 @@ module Google
|
|
321
357
|
# @param name [::String]
|
322
358
|
# Required. The name of the Execution to delete.
|
323
359
|
# Format:
|
324
|
-
# projects
|
325
|
-
# where
|
360
|
+
# `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`,
|
361
|
+
# where `{project}` can be project id or number.
|
326
362
|
# @param validate_only [::Boolean]
|
327
363
|
# Indicates that the request should be validated without actually
|
328
364
|
# deleting any resources.
|
@@ -336,6 +372,29 @@ module Google
|
|
336
372
|
# @return [::Gapic::Operation]
|
337
373
|
#
|
338
374
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
375
|
+
#
|
376
|
+
# @example Basic example
|
377
|
+
# require "google/cloud/run/v2"
|
378
|
+
#
|
379
|
+
# # Create a client object. The client can be reused for multiple calls.
|
380
|
+
# client = Google::Cloud::Run::V2::Executions::Rest::Client.new
|
381
|
+
#
|
382
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
383
|
+
# request = Google::Cloud::Run::V2::DeleteExecutionRequest.new
|
384
|
+
#
|
385
|
+
# # Call the delete_execution method.
|
386
|
+
# result = client.delete_execution request
|
387
|
+
#
|
388
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
389
|
+
# # check the status of an operation, cancel it, or wait for results.
|
390
|
+
# # Here is how to wait for a response.
|
391
|
+
# result.wait_until_done! timeout: 60
|
392
|
+
# if result.response?
|
393
|
+
# p result.response
|
394
|
+
# else
|
395
|
+
# puts "No response received."
|
396
|
+
# end
|
397
|
+
#
|
339
398
|
def delete_execution request, options = nil
|
340
399
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
341
400
|
|
@@ -372,6 +431,101 @@ module Google
|
|
372
431
|
raise ::Google::Cloud::Error.from_error(e)
|
373
432
|
end
|
374
433
|
|
434
|
+
##
|
435
|
+
# Cancels an Execution.
|
436
|
+
#
|
437
|
+
# @overload cancel_execution(request, options = nil)
|
438
|
+
# Pass arguments to `cancel_execution` via a request object, either of type
|
439
|
+
# {::Google::Cloud::Run::V2::CancelExecutionRequest} or an equivalent Hash.
|
440
|
+
#
|
441
|
+
# @param request [::Google::Cloud::Run::V2::CancelExecutionRequest, ::Hash]
|
442
|
+
# A request object representing the call parameters. Required. To specify no
|
443
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
444
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
445
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
446
|
+
#
|
447
|
+
# @overload cancel_execution(name: nil, validate_only: nil, etag: nil)
|
448
|
+
# Pass arguments to `cancel_execution` via keyword arguments. Note that at
|
449
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
450
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
451
|
+
#
|
452
|
+
# @param name [::String]
|
453
|
+
# Required. The name of the Execution to cancel.
|
454
|
+
# Format:
|
455
|
+
# `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`,
|
456
|
+
# where `{project}` can be project id or number.
|
457
|
+
# @param validate_only [::Boolean]
|
458
|
+
# Indicates that the request should be validated without actually
|
459
|
+
# cancelling any resources.
|
460
|
+
# @param etag [::String]
|
461
|
+
# A system-generated fingerprint for this version of the resource.
|
462
|
+
# This may be used to detect modification conflict during updates.
|
463
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
464
|
+
# @yieldparam result [::Gapic::Operation]
|
465
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
466
|
+
#
|
467
|
+
# @return [::Gapic::Operation]
|
468
|
+
#
|
469
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
470
|
+
#
|
471
|
+
# @example Basic example
|
472
|
+
# require "google/cloud/run/v2"
|
473
|
+
#
|
474
|
+
# # Create a client object. The client can be reused for multiple calls.
|
475
|
+
# client = Google::Cloud::Run::V2::Executions::Rest::Client.new
|
476
|
+
#
|
477
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
478
|
+
# request = Google::Cloud::Run::V2::CancelExecutionRequest.new
|
479
|
+
#
|
480
|
+
# # Call the cancel_execution method.
|
481
|
+
# result = client.cancel_execution request
|
482
|
+
#
|
483
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
484
|
+
# # check the status of an operation, cancel it, or wait for results.
|
485
|
+
# # Here is how to wait for a response.
|
486
|
+
# result.wait_until_done! timeout: 60
|
487
|
+
# if result.response?
|
488
|
+
# p result.response
|
489
|
+
# else
|
490
|
+
# puts "No response received."
|
491
|
+
# end
|
492
|
+
#
|
493
|
+
def cancel_execution request, options = nil
|
494
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
495
|
+
|
496
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Run::V2::CancelExecutionRequest
|
497
|
+
|
498
|
+
# Converts hash and nil to an options object
|
499
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
500
|
+
|
501
|
+
# Customize the options with defaults
|
502
|
+
call_metadata = @config.rpcs.cancel_execution.metadata.to_h
|
503
|
+
|
504
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
505
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
506
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
507
|
+
gapic_version: ::Google::Cloud::Run::V2::VERSION,
|
508
|
+
transports_version_send: [:rest]
|
509
|
+
|
510
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
511
|
+
|
512
|
+
options.apply_defaults timeout: @config.rpcs.cancel_execution.timeout,
|
513
|
+
metadata: call_metadata,
|
514
|
+
retry_policy: @config.rpcs.cancel_execution.retry_policy
|
515
|
+
|
516
|
+
options.apply_defaults timeout: @config.timeout,
|
517
|
+
metadata: @config.metadata,
|
518
|
+
retry_policy: @config.retry_policy
|
519
|
+
|
520
|
+
@executions_stub.cancel_execution request, options do |result, operation|
|
521
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
522
|
+
yield result, operation if block_given?
|
523
|
+
return result
|
524
|
+
end
|
525
|
+
rescue ::Gapic::Rest::Error => e
|
526
|
+
raise ::Google::Cloud::Error.from_error(e)
|
527
|
+
end
|
528
|
+
|
375
529
|
##
|
376
530
|
# Configuration class for the Executions REST API.
|
377
531
|
#
|
@@ -512,6 +666,11 @@ module Google
|
|
512
666
|
# @return [::Gapic::Config::Method]
|
513
667
|
#
|
514
668
|
attr_reader :delete_execution
|
669
|
+
##
|
670
|
+
# RPC-specific configuration for `cancel_execution`
|
671
|
+
# @return [::Gapic::Config::Method]
|
672
|
+
#
|
673
|
+
attr_reader :cancel_execution
|
515
674
|
|
516
675
|
# @private
|
517
676
|
def initialize parent_rpcs = nil
|
@@ -521,6 +680,8 @@ module Google
|
|
521
680
|
@list_executions = ::Gapic::Config::Method.new list_executions_config
|
522
681
|
delete_execution_config = parent_rpcs.delete_execution if parent_rpcs.respond_to? :delete_execution
|
523
682
|
@delete_execution = ::Gapic::Config::Method.new delete_execution_config
|
683
|
+
cancel_execution_config = parent_rpcs.cancel_execution if parent_rpcs.respond_to? :cancel_execution
|
684
|
+
@cancel_execution = ::Gapic::Config::Method.new cancel_execution_config
|
524
685
|
|
525
686
|
yield self if block_given?
|
526
687
|
end
|
@@ -136,6 +136,26 @@ module Google
|
|
136
136
|
# @return [::Gapic::Operation]
|
137
137
|
#
|
138
138
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
139
|
+
#
|
140
|
+
# @example Basic example
|
141
|
+
# require "google/longrunning"
|
142
|
+
#
|
143
|
+
# # Create a client object. The client can be reused for multiple calls.
|
144
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
145
|
+
#
|
146
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
147
|
+
# request = Google::Longrunning::ListOperationsRequest.new
|
148
|
+
#
|
149
|
+
# # Call the list_operations method.
|
150
|
+
# result = client.list_operations request
|
151
|
+
#
|
152
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
153
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
154
|
+
# result.each do |item|
|
155
|
+
# # Each element is of type ::Google::Longrunning::Operation.
|
156
|
+
# p item
|
157
|
+
# end
|
158
|
+
#
|
139
159
|
def list_operations request, options = nil
|
140
160
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
141
161
|
|
@@ -201,6 +221,29 @@ module Google
|
|
201
221
|
# @return [::Gapic::Operation]
|
202
222
|
#
|
203
223
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
224
|
+
#
|
225
|
+
# @example Basic example
|
226
|
+
# require "google/longrunning"
|
227
|
+
#
|
228
|
+
# # Create a client object. The client can be reused for multiple calls.
|
229
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
230
|
+
#
|
231
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
232
|
+
# request = Google::Longrunning::GetOperationRequest.new
|
233
|
+
#
|
234
|
+
# # Call the get_operation method.
|
235
|
+
# result = client.get_operation request
|
236
|
+
#
|
237
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
238
|
+
# # check the status of an operation, cancel it, or wait for results.
|
239
|
+
# # Here is how to wait for a response.
|
240
|
+
# result.wait_until_done! timeout: 60
|
241
|
+
# if result.response?
|
242
|
+
# p result.response
|
243
|
+
# else
|
244
|
+
# puts "No response received."
|
245
|
+
# end
|
246
|
+
#
|
204
247
|
def get_operation request, options = nil
|
205
248
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
206
249
|
|
@@ -267,6 +310,22 @@ module Google
|
|
267
310
|
# @return [::Google::Protobuf::Empty]
|
268
311
|
#
|
269
312
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
313
|
+
#
|
314
|
+
# @example Basic example
|
315
|
+
# require "google/longrunning"
|
316
|
+
#
|
317
|
+
# # Create a client object. The client can be reused for multiple calls.
|
318
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
319
|
+
#
|
320
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
321
|
+
# request = Google::Longrunning::DeleteOperationRequest.new
|
322
|
+
#
|
323
|
+
# # Call the delete_operation method.
|
324
|
+
# result = client.delete_operation request
|
325
|
+
#
|
326
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
327
|
+
# p result
|
328
|
+
#
|
270
329
|
def delete_operation request, options = nil
|
271
330
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
272
331
|
|
@@ -338,6 +397,22 @@ module Google
|
|
338
397
|
# @return [::Google::Protobuf::Empty]
|
339
398
|
#
|
340
399
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
400
|
+
#
|
401
|
+
# @example Basic example
|
402
|
+
# require "google/longrunning"
|
403
|
+
#
|
404
|
+
# # Create a client object. The client can be reused for multiple calls.
|
405
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
406
|
+
#
|
407
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
408
|
+
# request = Google::Longrunning::CancelOperationRequest.new
|
409
|
+
#
|
410
|
+
# # Call the cancel_operation method.
|
411
|
+
# result = client.cancel_operation request
|
412
|
+
#
|
413
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
414
|
+
# p result
|
415
|
+
#
|
341
416
|
def cancel_operation request, options = nil
|
342
417
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
343
418
|
|
@@ -412,6 +487,29 @@ module Google
|
|
412
487
|
# @return [::Gapic::Operation]
|
413
488
|
#
|
414
489
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
490
|
+
#
|
491
|
+
# @example Basic example
|
492
|
+
# require "google/longrunning"
|
493
|
+
#
|
494
|
+
# # Create a client object. The client can be reused for multiple calls.
|
495
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
496
|
+
#
|
497
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
498
|
+
# request = Google::Longrunning::WaitOperationRequest.new
|
499
|
+
#
|
500
|
+
# # Call the wait_operation method.
|
501
|
+
# result = client.wait_operation request
|
502
|
+
#
|
503
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
504
|
+
# # check the status of an operation, cancel it, or wait for results.
|
505
|
+
# # Here is how to wait for a response.
|
506
|
+
# result.wait_until_done! timeout: 60
|
507
|
+
# if result.response?
|
508
|
+
# p result.response
|
509
|
+
# else
|
510
|
+
# puts "No response received."
|
511
|
+
# end
|
512
|
+
#
|
415
513
|
def wait_operation request, options = nil
|
416
514
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
417
515
|
|