Skip to content

Commit

Permalink
feat(run): update the API
Browse files Browse the repository at this point in the history
#### run:v2

The following keys were added:
- schemas.GoogleCloudRunV2ContainerOverride.description
- schemas.GoogleCloudRunV2ContainerOverride.id
- schemas.GoogleCloudRunV2ContainerOverride.properties.args.description
- schemas.GoogleCloudRunV2ContainerOverride.properties.args.items.type
- schemas.GoogleCloudRunV2ContainerOverride.properties.args.type
- schemas.GoogleCloudRunV2ContainerOverride.properties.clearArgs.description
- schemas.GoogleCloudRunV2ContainerOverride.properties.clearArgs.type
- schemas.GoogleCloudRunV2ContainerOverride.properties.env.description
- schemas.GoogleCloudRunV2ContainerOverride.properties.env.items.$ref
- schemas.GoogleCloudRunV2ContainerOverride.properties.env.type
- schemas.GoogleCloudRunV2ContainerOverride.properties.name.description
- schemas.GoogleCloudRunV2ContainerOverride.properties.name.type
- schemas.GoogleCloudRunV2ContainerOverride.type
- schemas.GoogleCloudRunV2Overrides.description
- schemas.GoogleCloudRunV2Overrides.id
- schemas.GoogleCloudRunV2Overrides.properties.containerOverrides.description
- schemas.GoogleCloudRunV2Overrides.properties.containerOverrides.items.$ref
- schemas.GoogleCloudRunV2Overrides.properties.containerOverrides.type
- schemas.GoogleCloudRunV2Overrides.properties.taskCount.description
- schemas.GoogleCloudRunV2Overrides.properties.taskCount.format
- schemas.GoogleCloudRunV2Overrides.properties.taskCount.type
- schemas.GoogleCloudRunV2Overrides.properties.timeout.description
- schemas.GoogleCloudRunV2Overrides.properties.timeout.format
- schemas.GoogleCloudRunV2Overrides.properties.timeout.type
- schemas.GoogleCloudRunV2Overrides.type
- schemas.GoogleCloudRunV2RunJobRequest.properties.overrides.$ref
- schemas.GoogleCloudRunV2RunJobRequest.properties.overrides.description

The following keys were changed:
- resources.projects.resources.locations.resources.jobs.resources.executions.methods.cancel.parameters.name.description
- resources.projects.resources.locations.resources.jobs.resources.executions.methods.delete.parameters.name.description
- resources.projects.resources.locations.resources.jobs.resources.executions.methods.get.parameters.name.description
- resources.projects.resources.locations.resources.jobs.resources.executions.methods.list.parameters.parent.description
  • Loading branch information
yoshi-automation authored and sofisl committed Sep 26, 2023
1 parent db7f407 commit 8d67594
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 9 deletions.
67 changes: 62 additions & 5 deletions discovery/run-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@
],
"parameters": {
"name": {
"description": "Required. The name of the Execution to cancel. Format: projects/{project}/locations/{location}/jobs/{job}/executions/{execution}, where {project} can be project id or number.",
"description": "Required. The name of the Execution to cancel. Format: `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, where `{project}` can be project id or number.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+/executions/[^/]+$",
"required": true,
Expand Down Expand Up @@ -450,7 +450,7 @@
"type": "string"
},
"name": {
"description": "Required. The name of the Execution to delete. Format: projects/{project}/locations/{location}/jobs/{job}/executions/{execution}, where {project} can be project id or number.",
"description": "Required. The name of the Execution to delete. Format: `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, where `{project}` can be project id or number.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+/executions/[^/]+$",
"required": true,
Expand Down Expand Up @@ -480,7 +480,7 @@
],
"parameters": {
"name": {
"description": "Required. The full name of the Execution. Format: projects/{project}/locations/{location}/jobs/{job}/executions/{execution}, where {project} can be project id or number.",
"description": "Required. The full name of the Execution. Format: `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, where `{project}` can be project id or number.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+/executions/[^/]+$",
"required": true,
Expand Down Expand Up @@ -516,7 +516,7 @@
"type": "string"
},
"parent": {
"description": "Required. The Execution from which the Executions should be listed. To list all Executions across Jobs, use \"-\" instead of Job name. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number.",
"description": "Required. The Execution from which the Executions should be listed. To list all Executions across Jobs, use \"-\" instead of Job name. Format: `projects/{project}/locations/{location}/jobs/{job}`, where `{project}` can be project id or number.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$",
"required": true,
Expand Down Expand Up @@ -1115,7 +1115,7 @@
}
}
},
"revision": "20230917",
"revision": "20230924",
"rootUrl": "https://run.googleapis.com/",
"schemas": {
"GoogleCloudRunV2BinaryAuthorization": {
Expand Down Expand Up @@ -1381,6 +1381,35 @@
},
"type": "object"
},
"GoogleCloudRunV2ContainerOverride": {
"description": "Per-container override specification.",
"id": "GoogleCloudRunV2ContainerOverride",
"properties": {
"args": {
"description": "Optional. Arguments to the entrypoint. Will replace existing args for override.",
"items": {
"type": "string"
},
"type": "array"
},
"clearArgs": {
"description": "Optional. True if the intention is to clear out existing args list.",
"type": "boolean"
},
"env": {
"description": "List of environment variables to set in the container. Will be merged with existing env for override.",
"items": {
"$ref": "GoogleCloudRunV2EnvVar"
},
"type": "array"
},
"name": {
"description": "The name of the container specified as a DNS_LABEL.",
"type": "string"
}
},
"type": "object"
},
"GoogleCloudRunV2ContainerPort": {
"description": "ContainerPort represents a network port in a single container.",
"id": "GoogleCloudRunV2ContainerPort",
Expand Down Expand Up @@ -2012,6 +2041,30 @@
},
"type": "object"
},
"GoogleCloudRunV2Overrides": {
"description": "RunJob Overrides that contains Execution fields to be overridden.",
"id": "GoogleCloudRunV2Overrides",
"properties": {
"containerOverrides": {
"description": "Per container override specification.",
"items": {
"$ref": "GoogleCloudRunV2ContainerOverride"
},
"type": "array"
},
"taskCount": {
"description": "Optional. The desired number of tasks the execution should run. Will replace existing task_count value.",
"format": "int32",
"type": "integer"
},
"timeout": {
"description": "Duration in seconds the task may be active before the system will actively try to mark it failed and kill associated containers. Will replace existing timeout_seconds value.",
"format": "google-duration",
"type": "string"
}
},
"type": "object"
},
"GoogleCloudRunV2Probe": {
"description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.",
"id": "GoogleCloudRunV2Probe",
Expand Down Expand Up @@ -2384,6 +2437,10 @@
"description": "A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.",
"type": "string"
},
"overrides": {
"$ref": "GoogleCloudRunV2Overrides",
"description": "Overrides specification for a given execution of a job. If provided, overrides will be applied to update the execution or task spec."
},
"validateOnly": {
"description": "Indicates that the request should be validated without actually deleting any resources.",
"type": "boolean"
Expand Down
50 changes: 46 additions & 4 deletions src/apis/run/v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,27 @@ export namespace run_v2 {
*/
workingDir?: string | null;
}
/**
* Per-container override specification.
*/
export interface Schema$GoogleCloudRunV2ContainerOverride {
/**
* Optional. Arguments to the entrypoint. Will replace existing args for override.
*/
args?: string[] | null;
/**
* Optional. True if the intention is to clear out existing args list.
*/
clearArgs?: boolean | null;
/**
* List of environment variables to set in the container. Will be merged with existing env for override.
*/
env?: Schema$GoogleCloudRunV2EnvVar[];
/**
* The name of the container specified as a DNS_LABEL.
*/
name?: string | null;
}
/**
* ContainerPort represents a network port in a single container.
*/
Expand Down Expand Up @@ -682,6 +703,23 @@ export namespace run_v2 {
*/
tags?: string[] | null;
}
/**
* RunJob Overrides that contains Execution fields to be overridden.
*/
export interface Schema$GoogleCloudRunV2Overrides {
/**
* Per container override specification.
*/
containerOverrides?: Schema$GoogleCloudRunV2ContainerOverride[];
/**
* Optional. The desired number of tasks the execution should run. Will replace existing task_count value.
*/
taskCount?: number | null;
/**
* Duration in seconds the task may be active before the system will actively try to mark it failed and kill associated containers. Will replace existing timeout_seconds value.
*/
timeout?: string | null;
}
/**
* Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.
*/
Expand Down Expand Up @@ -931,6 +969,10 @@ export namespace run_v2 {
* A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.
*/
etag?: string | null;
/**
* Overrides specification for a given execution of a job. If provided, overrides will be applied to update the execution or task spec.
*/
overrides?: Schema$GoogleCloudRunV2Overrides;
/**
* Indicates that the request should be validated without actually deleting any resources.
*/
Expand Down Expand Up @@ -2954,7 +2996,7 @@ export namespace run_v2 {
export interface Params$Resource$Projects$Locations$Jobs$Executions$Cancel
extends StandardParameters {
/**
* Required. The name of the Execution to cancel. Format: projects/{project\}/locations/{location\}/jobs/{job\}/executions/{execution\}, where {project\} can be project id or number.
* Required. The name of the Execution to cancel. Format: `projects/{project\}/locations/{location\}/jobs/{job\}/executions/{execution\}`, where `{project\}` can be project id or number.
*/
name?: string;

Expand All @@ -2970,7 +3012,7 @@ export namespace run_v2 {
*/
etag?: string;
/**
* Required. The name of the Execution to delete. Format: projects/{project\}/locations/{location\}/jobs/{job\}/executions/{execution\}, where {project\} can be project id or number.
* Required. The name of the Execution to delete. Format: `projects/{project\}/locations/{location\}/jobs/{job\}/executions/{execution\}`, where `{project\}` can be project id or number.
*/
name?: string;
/**
Expand All @@ -2981,7 +3023,7 @@ export namespace run_v2 {
export interface Params$Resource$Projects$Locations$Jobs$Executions$Get
extends StandardParameters {
/**
* Required. The full name of the Execution. Format: projects/{project\}/locations/{location\}/jobs/{job\}/executions/{execution\}, where {project\} can be project id or number.
* Required. The full name of the Execution. Format: `projects/{project\}/locations/{location\}/jobs/{job\}/executions/{execution\}`, where `{project\}` can be project id or number.
*/
name?: string;
}
Expand All @@ -2996,7 +3038,7 @@ export namespace run_v2 {
*/
pageToken?: string;
/**
* Required. The Execution from which the Executions should be listed. To list all Executions across Jobs, use "-" instead of Job name. Format: projects/{project\}/locations/{location\}/jobs/{job\}, where {project\} can be project id or number.
* Required. The Execution from which the Executions should be listed. To list all Executions across Jobs, use "-" instead of Job name. Format: `projects/{project\}/locations/{location\}/jobs/{job\}`, where `{project\}` can be project id or number.
*/
parent?: string;
/**
Expand Down

0 comments on commit 8d67594

Please sign in to comment.