Skip to content

Commit 8f8081d

Browse files
feat(composer): update the api
#### composer:v1 The following keys were added: - resources.projects.resources.locations.resources.environments.methods.databaseFailover (Total Keys: 12) - resources.projects.resources.locations.resources.environments.methods.executeAirflowCommand (Total Keys: 12) - resources.projects.resources.locations.resources.environments.methods.fetchDatabaseProperties (Total Keys: 11) - resources.projects.resources.locations.resources.environments.methods.pollAirflowCommand (Total Keys: 12) - resources.projects.resources.locations.resources.environments.methods.stopAirflowCommand (Total Keys: 12) - schemas.DatabaseFailoverRequest (Total Keys: 2) - schemas.DatabaseFailoverResponse (Total Keys: 2) - schemas.EnvironmentConfig.properties.resilienceMode.type (Total Keys: 1) - schemas.ExecuteAirflowCommandRequest (Total Keys: 6) - schemas.ExecuteAirflowCommandResponse (Total Keys: 6) - schemas.ExitInfo (Total Keys: 5) - schemas.FetchDatabasePropertiesResponse (Total Keys: 5) - schemas.Line (Total Keys: 3) - schemas.PollAirflowCommandRequest (Total Keys: 5) - schemas.PollAirflowCommandResponse (Total Keys: 6) - schemas.StopAirflowCommandRequest (Total Keys: 6) - schemas.StopAirflowCommandResponse (Total Keys: 5) #### composer:v1beta1 The following keys were added: - resources.projects.resources.locations.resources.environments.methods.databaseFailover (Total Keys: 12) - resources.projects.resources.locations.resources.environments.methods.executeAirflowCommand (Total Keys: 12) - resources.projects.resources.locations.resources.environments.methods.fetchDatabaseProperties (Total Keys: 11) - resources.projects.resources.locations.resources.environments.methods.pollAirflowCommand (Total Keys: 12) - resources.projects.resources.locations.resources.environments.methods.stopAirflowCommand (Total Keys: 12) - schemas.DatabaseFailoverRequest (Total Keys: 2) - schemas.DatabaseFailoverResponse (Total Keys: 2) - schemas.EnvironmentConfig.properties.resilienceMode.type (Total Keys: 1) - schemas.ExecuteAirflowCommandRequest (Total Keys: 6) - schemas.FetchDatabasePropertiesResponse (Total Keys: 5) - schemas.PollAirflowCommandRequest (Total Keys: 5) - schemas.StopAirflowCommandRequest (Total Keys: 6) - schemas.StopAirflowCommandResponse (Total Keys: 5)
1 parent 9fa213d commit 8f8081d

File tree

4 files changed

+991
-6
lines changed

4 files changed

+991
-6
lines changed

docs/dyn/composer_v1.projects.locations.environments.html

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,18 @@ <h2>Instance Methods</h2>
8080
<p class="toc_element">
8181
<code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
8282
<p class="firstline">Create a new environment.</p>
83+
<p class="toc_element">
84+
<code><a href="#databaseFailover">databaseFailover(environment, body=None, x__xgafv=None)</a></code></p>
85+
<p class="firstline">Triggers database failover (only for highly resilient environments).</p>
8386
<p class="toc_element">
8487
<code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
8588
<p class="firstline">Delete an environment.</p>
89+
<p class="toc_element">
90+
<code><a href="#executeAirflowCommand">executeAirflowCommand(environment, body=None, x__xgafv=None)</a></code></p>
91+
<p class="firstline">Executes Airflow CLI command.</p>
92+
<p class="toc_element">
93+
<code><a href="#fetchDatabaseProperties">fetchDatabaseProperties(environment, x__xgafv=None)</a></code></p>
94+
<p class="firstline">Fetches database properties.</p>
8695
<p class="toc_element">
8796
<code><a href="#get">get(name, x__xgafv=None)</a></code></p>
8897
<p class="firstline">Get an existing environment.</p>
@@ -98,9 +107,15 @@ <h2>Instance Methods</h2>
98107
<p class="toc_element">
99108
<code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
100109
<p class="firstline">Update an environment.</p>
110+
<p class="toc_element">
111+
<code><a href="#pollAirflowCommand">pollAirflowCommand(environment, body=None, x__xgafv=None)</a></code></p>
112+
<p class="firstline">Polls Airflow CLI command execution and fetches logs.</p>
101113
<p class="toc_element">
102114
<code><a href="#saveSnapshot">saveSnapshot(environment, body=None, x__xgafv=None)</a></code></p>
103115
<p class="firstline">Creates a snapshots of a Cloud Composer environment. As a result of this operation, snapshot of environment's state is stored in a location specified in the SaveSnapshotRequest.</p>
116+
<p class="toc_element">
117+
<code><a href="#stopAirflowCommand">stopAirflowCommand(environment, body=None, x__xgafv=None)</a></code></p>
118+
<p class="firstline">Stops Airflow CLI command execution.</p>
104119
<h3>Method Details</h3>
105120
<div class="method">
106121
<code class="details" id="close">close()</code>
@@ -192,6 +207,7 @@ <h3>Method Details</h3>
192207
&quot;timeZone&quot;: &quot;A String&quot;, # Optional. Time zone that sets the context to interpret snapshot_creation_schedule.
193208
},
194209
},
210+
&quot;resilienceMode&quot;: &quot;A String&quot;, # Optional. Resilience mode of the Cloud Composer Environment. This field is supported for Cloud Composer environments in versions composer-2.2.0-airflow-*.*.* and newer.
195211
&quot;softwareConfig&quot;: { # Specifies the selection and configuration of software inside the environment. # The configuration settings for software inside the environment.
196212
&quot;airflowConfigOverrides&quot;: { # Optional. Apache Airflow configuration properties to override. Property keys contain the section and property names, separated by a hyphen, for example &quot;core-dags_are_paused_at_creation&quot;. Section names must not contain hyphens (&quot;-&quot;), opening square brackets (&quot;[&quot;), or closing square brackets (&quot;]&quot;). The property name must not be empty and must not contain an equals sign (&quot;=&quot;) or semicolon (&quot;;&quot;). Section and property names must not contain a period (&quot;.&quot;). Apache Airflow configuration property names must be written in [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can contain any character, and can be written in any lower/upper case format. Certain Apache Airflow configuration property values are [blocked](/composer/docs/concepts/airflow-configurations), and cannot be overridden.
197213
&quot;a_key&quot;: &quot;A String&quot;,
@@ -277,6 +293,47 @@ <h3>Method Details</h3>
277293
}</pre>
278294
</div>
279295

296+
<div class="method">
297+
<code class="details" id="databaseFailover">databaseFailover(environment, body=None, x__xgafv=None)</code>
298+
<pre>Triggers database failover (only for highly resilient environments).
299+
300+
Args:
301+
environment: string, Target environment: &quot;projects/{projectId}/locations/{locationId}/environments/{environmentId}&quot; (required)
302+
body: object, The request body.
303+
The object takes the form of:
304+
305+
{ # Request to trigger database failover (only for highly resilient environments).
306+
}
307+
308+
x__xgafv: string, V1 error format.
309+
Allowed values
310+
1 - v1 error format
311+
2 - v2 error format
312+
313+
Returns:
314+
An object of the form:
315+
316+
{ # This resource represents a long-running operation that is the result of a network API call.
317+
&quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
318+
&quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
319+
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
320+
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
321+
{
322+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
323+
},
324+
],
325+
&quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
326+
},
327+
&quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
328+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
329+
},
330+
&quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
331+
&quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
332+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
333+
},
334+
}</pre>
335+
</div>
336+
280337
<div class="method">
281338
<code class="details" id="delete">delete(name, x__xgafv=None)</code>
282339
<pre>Delete an environment.
@@ -312,6 +369,60 @@ <h3>Method Details</h3>
312369
}</pre>
313370
</div>
314371

372+
<div class="method">
373+
<code class="details" id="executeAirflowCommand">executeAirflowCommand(environment, body=None, x__xgafv=None)</code>
374+
<pre>Executes Airflow CLI command.
375+
376+
Args:
377+
environment: string, The resource name of the environment in the form: &quot;projects/{projectId}/locations/{locationId}/environments/{environmentId}&quot;. (required)
378+
body: object, The request body.
379+
The object takes the form of:
380+
381+
{ # Execute Airflow Command request.
382+
&quot;command&quot;: &quot;A String&quot;, # Airflow command.
383+
&quot;parameters&quot;: [ # Parameters for the Airflow command/subcommand as an array of arguments. It may contain positional arguments like `[&quot;my-dag-id&quot;]`, key-value parameters like `[&quot;--foo=bar&quot;]` or `[&quot;--foo&quot;,&quot;bar&quot;]`, or other flags like `[&quot;-f&quot;]`.
384+
&quot;A String&quot;,
385+
],
386+
&quot;subcommand&quot;: &quot;A String&quot;, # Airflow subcommand.
387+
}
388+
389+
x__xgafv: string, V1 error format.
390+
Allowed values
391+
1 - v1 error format
392+
2 - v2 error format
393+
394+
Returns:
395+
An object of the form:
396+
397+
{ # Response to ExecuteAirflowCommandRequest.
398+
&quot;error&quot;: &quot;A String&quot;, # Error message. Empty if there was no error.
399+
&quot;executionId&quot;: &quot;A String&quot;, # The unique ID of the command execution for polling.
400+
&quot;pod&quot;: &quot;A String&quot;, # The name of the pod where the command is executed.
401+
&quot;podNamespace&quot;: &quot;A String&quot;, # The namespace of the pod where the command is executed.
402+
}</pre>
403+
</div>
404+
405+
<div class="method">
406+
<code class="details" id="fetchDatabaseProperties">fetchDatabaseProperties(environment, x__xgafv=None)</code>
407+
<pre>Fetches database properties.
408+
409+
Args:
410+
environment: string, Required. The resource name of the environment, in the form: &quot;projects/{projectId}/locations/{locationId}/environments/{environmentId}&quot; (required)
411+
x__xgafv: string, V1 error format.
412+
Allowed values
413+
1 - v1 error format
414+
2 - v2 error format
415+
416+
Returns:
417+
An object of the form:
418+
419+
{ # Response for FetchDatabasePropertiesRequest.
420+
&quot;isFailoverReplicaAvailable&quot;: True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only fail over to the failover replica when the status is true.
421+
&quot;primaryGceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from.
422+
&quot;secondaryGceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the failover instance is currently serving from for a regional Cloud SQL instance.
423+
}</pre>
424+
</div>
425+
315426
<div class="method">
316427
<code class="details" id="get">get(name, x__xgafv=None)</code>
317428
<pre>Get an existing environment.
@@ -402,6 +513,7 @@ <h3>Method Details</h3>
402513
&quot;timeZone&quot;: &quot;A String&quot;, # Optional. Time zone that sets the context to interpret snapshot_creation_schedule.
403514
},
404515
},
516+
&quot;resilienceMode&quot;: &quot;A String&quot;, # Optional. Resilience mode of the Cloud Composer Environment. This field is supported for Cloud Composer environments in versions composer-2.2.0-airflow-*.*.* and newer.
405517
&quot;softwareConfig&quot;: { # Specifies the selection and configuration of software inside the environment. # The configuration settings for software inside the environment.
406518
&quot;airflowConfigOverrides&quot;: { # Optional. Apache Airflow configuration properties to override. Property keys contain the section and property names, separated by a hyphen, for example &quot;core-dags_are_paused_at_creation&quot;. Section names must not contain hyphens (&quot;-&quot;), opening square brackets (&quot;[&quot;), or closing square brackets (&quot;]&quot;). The property name must not be empty and must not contain an equals sign (&quot;=&quot;) or semicolon (&quot;;&quot;). Section and property names must not contain a period (&quot;.&quot;). Apache Airflow configuration property names must be written in [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can contain any character, and can be written in any lower/upper case format. Certain Apache Airflow configuration property values are [blocked](/composer/docs/concepts/airflow-configurations), and cannot be overridden.
407519
&quot;a_key&quot;: &quot;A String&quot;,
@@ -553,6 +665,7 @@ <h3>Method Details</h3>
553665
&quot;timeZone&quot;: &quot;A String&quot;, # Optional. Time zone that sets the context to interpret snapshot_creation_schedule.
554666
},
555667
},
668+
&quot;resilienceMode&quot;: &quot;A String&quot;, # Optional. Resilience mode of the Cloud Composer Environment. This field is supported for Cloud Composer environments in versions composer-2.2.0-airflow-*.*.* and newer.
556669
&quot;softwareConfig&quot;: { # Specifies the selection and configuration of software inside the environment. # The configuration settings for software inside the environment.
557670
&quot;airflowConfigOverrides&quot;: { # Optional. Apache Airflow configuration properties to override. Property keys contain the section and property names, separated by a hyphen, for example &quot;core-dags_are_paused_at_creation&quot;. Section names must not contain hyphens (&quot;-&quot;), opening square brackets (&quot;[&quot;), or closing square brackets (&quot;]&quot;). The property name must not be empty and must not contain an equals sign (&quot;=&quot;) or semicolon (&quot;;&quot;). Section and property names must not contain a period (&quot;.&quot;). Apache Airflow configuration property names must be written in [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can contain any character, and can be written in any lower/upper case format. Certain Apache Airflow configuration property values are [blocked](/composer/docs/concepts/airflow-configurations), and cannot be overridden.
558671
&quot;a_key&quot;: &quot;A String&quot;,
@@ -758,6 +871,7 @@ <h3>Method Details</h3>
758871
&quot;timeZone&quot;: &quot;A String&quot;, # Optional. Time zone that sets the context to interpret snapshot_creation_schedule.
759872
},
760873
},
874+
&quot;resilienceMode&quot;: &quot;A String&quot;, # Optional. Resilience mode of the Cloud Composer Environment. This field is supported for Cloud Composer environments in versions composer-2.2.0-airflow-*.*.* and newer.
761875
&quot;softwareConfig&quot;: { # Specifies the selection and configuration of software inside the environment. # The configuration settings for software inside the environment.
762876
&quot;airflowConfigOverrides&quot;: { # Optional. Apache Airflow configuration properties to override. Property keys contain the section and property names, separated by a hyphen, for example &quot;core-dags_are_paused_at_creation&quot;. Section names must not contain hyphens (&quot;-&quot;), opening square brackets (&quot;[&quot;), or closing square brackets (&quot;]&quot;). The property name must not be empty and must not contain an equals sign (&quot;=&quot;) or semicolon (&quot;;&quot;). Section and property names must not contain a period (&quot;.&quot;). Apache Airflow configuration property names must be written in [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can contain any character, and can be written in any lower/upper case format. Certain Apache Airflow configuration property values are [blocked](/composer/docs/concepts/airflow-configurations), and cannot be overridden.
763877
&quot;a_key&quot;: &quot;A String&quot;,
@@ -844,6 +958,45 @@ <h3>Method Details</h3>
844958
}</pre>
845959
</div>
846960

961+
<div class="method">
962+
<code class="details" id="pollAirflowCommand">pollAirflowCommand(environment, body=None, x__xgafv=None)</code>
963+
<pre>Polls Airflow CLI command execution and fetches logs.
964+
965+
Args:
966+
environment: string, The resource name of the environment in the form: &quot;projects/{projectId}/locations/{locationId}/environments/{environmentId}&quot; (required)
967+
body: object, The request body.
968+
The object takes the form of:
969+
970+
{ # Poll Airflow Command request.
971+
&quot;executionId&quot;: &quot;A String&quot;, # The unique ID of the command execution.
972+
&quot;nextLineNumber&quot;: 42, # Line number from which new logs should be fetched.
973+
&quot;pod&quot;: &quot;A String&quot;, # The name of the pod where the command is executed.
974+
&quot;podNamespace&quot;: &quot;A String&quot;, # The namespace of the pod where the command is executed.
975+
}
976+
977+
x__xgafv: string, V1 error format.
978+
Allowed values
979+
1 - v1 error format
980+
2 - v2 error format
981+
982+
Returns:
983+
An object of the form:
984+
985+
{ # Response to PollAirflowCommandRequest.
986+
&quot;exitInfo&quot;: { # Information about how a command ended. # The result exit status of the command.
987+
&quot;error&quot;: &quot;A String&quot;, # Error message. Empty if there was no error.
988+
&quot;exitCode&quot;: 42, # The exit code from the command execution.
989+
},
990+
&quot;output&quot;: [ # Output from the command execution. It may not contain the full output and the caller may need to poll for more lines.
991+
{ # Contains information about a single line from logs.
992+
&quot;content&quot;: &quot;A String&quot;, # Text content of the log line.
993+
&quot;lineNumber&quot;: 42, # Number of the line.
994+
},
995+
],
996+
&quot;outputEnd&quot;: True or False, # Whether the command execution has finished and there is no more output.
997+
}</pre>
998+
</div>
999+
8471000
<div class="method">
8481001
<code class="details" id="saveSnapshot">saveSnapshot(environment, body=None, x__xgafv=None)</code>
8491002
<pre>Creates a snapshots of a Cloud Composer environment. As a result of this operation, snapshot of environment&#x27;s state is stored in a location specified in the SaveSnapshotRequest.
@@ -886,4 +1039,36 @@ <h3>Method Details</h3>
8861039
}</pre>
8871040
</div>
8881041

1042+
<div class="method">
1043+
<code class="details" id="stopAirflowCommand">stopAirflowCommand(environment, body=None, x__xgafv=None)</code>
1044+
<pre>Stops Airflow CLI command execution.
1045+
1046+
Args:
1047+
environment: string, The resource name of the environment in the form: &quot;projects/{projectId}/locations/{locationId}/environments/{environmentId}&quot;. (required)
1048+
body: object, The request body.
1049+
The object takes the form of:
1050+
1051+
{ # Stop Airflow Command request.
1052+
&quot;executionId&quot;: &quot;A String&quot;, # The unique ID of the command execution.
1053+
&quot;force&quot;: True or False, # If true, the execution is terminated forcefully (SIGKILL). If false, the execution is stopped gracefully, giving it time for cleanup.
1054+
&quot;pod&quot;: &quot;A String&quot;, # The name of the pod where the command is executed.
1055+
&quot;podNamespace&quot;: &quot;A String&quot;, # The namespace of the pod where the command is executed.
1056+
}
1057+
1058+
x__xgafv: string, V1 error format.
1059+
Allowed values
1060+
1 - v1 error format
1061+
2 - v2 error format
1062+
1063+
Returns:
1064+
An object of the form:
1065+
1066+
{ # Response to StopAirflowCommandRequest.
1067+
&quot;isDone&quot;: True or False, # Whether the execution is still running.
1068+
&quot;output&quot;: [ # Output message from stopping execution request.
1069+
&quot;A String&quot;,
1070+
],
1071+
}</pre>
1072+
</div>
1073+
8891074
</body></html>

0 commit comments

Comments
 (0)