Skip to content

Commit

Permalink
feat(composer): update the api
Browse files Browse the repository at this point in the history
#### 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)
  • Loading branch information
yoshi-automation committed May 24, 2023
1 parent 9fa213d commit 8f8081d
Show file tree
Hide file tree
Showing 4 changed files with 991 additions and 6 deletions.
185 changes: 185 additions & 0 deletions docs/dyn/composer_v1.projects.locations.environments.html
Expand Up @@ -80,9 +80,18 @@ <h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Create a new environment.</p>
<p class="toc_element">
<code><a href="#databaseFailover">databaseFailover(environment, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Triggers database failover (only for highly resilient environments).</p>
<p class="toc_element">
<code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
<p class="firstline">Delete an environment.</p>
<p class="toc_element">
<code><a href="#executeAirflowCommand">executeAirflowCommand(environment, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Executes Airflow CLI command.</p>
<p class="toc_element">
<code><a href="#fetchDatabaseProperties">fetchDatabaseProperties(environment, x__xgafv=None)</a></code></p>
<p class="firstline">Fetches database properties.</p>
<p class="toc_element">
<code><a href="#get">get(name, x__xgafv=None)</a></code></p>
<p class="firstline">Get an existing environment.</p>
Expand All @@ -98,9 +107,15 @@ <h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
<p class="firstline">Update an environment.</p>
<p class="toc_element">
<code><a href="#pollAirflowCommand">pollAirflowCommand(environment, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Polls Airflow CLI command execution and fetches logs.</p>
<p class="toc_element">
<code><a href="#saveSnapshot">saveSnapshot(environment, body=None, x__xgafv=None)</a></code></p>
<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>
<p class="toc_element">
<code><a href="#stopAirflowCommand">stopAirflowCommand(environment, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Stops Airflow CLI command execution.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="close">close()</code>
Expand Down Expand Up @@ -192,6 +207,7 @@ <h3>Method Details</h3>
&quot;timeZone&quot;: &quot;A String&quot;, # Optional. Time zone that sets the context to interpret snapshot_creation_schedule.
},
},
&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.
&quot;softwareConfig&quot;: { # Specifies the selection and configuration of software inside the environment. # The configuration settings for software inside the environment.
&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.
&quot;a_key&quot;: &quot;A String&quot;,
Expand Down Expand Up @@ -277,6 +293,47 @@ <h3>Method Details</h3>
}</pre>
</div>

<div class="method">
<code class="details" id="databaseFailover">databaseFailover(environment, body=None, x__xgafv=None)</code>
<pre>Triggers database failover (only for highly resilient environments).

Args:
environment: string, Target environment: &quot;projects/{projectId}/locations/{locationId}/environments/{environmentId}&quot; (required)
body: object, The request body.
The object takes the form of:

{ # Request to trigger database failover (only for highly resilient environments).
}

x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format

Returns:
An object of the form:

{ # This resource represents a long-running operation that is the result of a network API call.
&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.
&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.
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
{
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
],
&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.
},
&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.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
&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}`.
&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`.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
}</pre>
</div>

<div class="method">
<code class="details" id="delete">delete(name, x__xgafv=None)</code>
<pre>Delete an environment.
Expand Down Expand Up @@ -312,6 +369,60 @@ <h3>Method Details</h3>
}</pre>
</div>

<div class="method">
<code class="details" id="executeAirflowCommand">executeAirflowCommand(environment, body=None, x__xgafv=None)</code>
<pre>Executes Airflow CLI command.

Args:
environment: string, The resource name of the environment in the form: &quot;projects/{projectId}/locations/{locationId}/environments/{environmentId}&quot;. (required)
body: object, The request body.
The object takes the form of:

{ # Execute Airflow Command request.
&quot;command&quot;: &quot;A String&quot;, # Airflow command.
&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;]`.
&quot;A String&quot;,
],
&quot;subcommand&quot;: &quot;A String&quot;, # Airflow subcommand.
}

x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format

Returns:
An object of the form:

{ # Response to ExecuteAirflowCommandRequest.
&quot;error&quot;: &quot;A String&quot;, # Error message. Empty if there was no error.
&quot;executionId&quot;: &quot;A String&quot;, # The unique ID of the command execution for polling.
&quot;pod&quot;: &quot;A String&quot;, # The name of the pod where the command is executed.
&quot;podNamespace&quot;: &quot;A String&quot;, # The namespace of the pod where the command is executed.
}</pre>
</div>

<div class="method">
<code class="details" id="fetchDatabaseProperties">fetchDatabaseProperties(environment, x__xgafv=None)</code>
<pre>Fetches database properties.

Args:
environment: string, Required. The resource name of the environment, in the form: &quot;projects/{projectId}/locations/{locationId}/environments/{environmentId}&quot; (required)
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format

Returns:
An object of the form:

{ # Response for FetchDatabasePropertiesRequest.
&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.
&quot;primaryGceZone&quot;: &quot;A String&quot;, # The Compute Engine zone that the instance is currently serving from.
&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.
}</pre>
</div>

<div class="method">
<code class="details" id="get">get(name, x__xgafv=None)</code>
<pre>Get an existing environment.
Expand Down Expand Up @@ -402,6 +513,7 @@ <h3>Method Details</h3>
&quot;timeZone&quot;: &quot;A String&quot;, # Optional. Time zone that sets the context to interpret snapshot_creation_schedule.
},
},
&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.
&quot;softwareConfig&quot;: { # Specifies the selection and configuration of software inside the environment. # The configuration settings for software inside the environment.
&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.
&quot;a_key&quot;: &quot;A String&quot;,
Expand Down Expand Up @@ -553,6 +665,7 @@ <h3>Method Details</h3>
&quot;timeZone&quot;: &quot;A String&quot;, # Optional. Time zone that sets the context to interpret snapshot_creation_schedule.
},
},
&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.
&quot;softwareConfig&quot;: { # Specifies the selection and configuration of software inside the environment. # The configuration settings for software inside the environment.
&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.
&quot;a_key&quot;: &quot;A String&quot;,
Expand Down Expand Up @@ -758,6 +871,7 @@ <h3>Method Details</h3>
&quot;timeZone&quot;: &quot;A String&quot;, # Optional. Time zone that sets the context to interpret snapshot_creation_schedule.
},
},
&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.
&quot;softwareConfig&quot;: { # Specifies the selection and configuration of software inside the environment. # The configuration settings for software inside the environment.
&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.
&quot;a_key&quot;: &quot;A String&quot;,
Expand Down Expand Up @@ -844,6 +958,45 @@ <h3>Method Details</h3>
}</pre>
</div>

<div class="method">
<code class="details" id="pollAirflowCommand">pollAirflowCommand(environment, body=None, x__xgafv=None)</code>
<pre>Polls Airflow CLI command execution and fetches logs.

Args:
environment: string, The resource name of the environment in the form: &quot;projects/{projectId}/locations/{locationId}/environments/{environmentId}&quot; (required)
body: object, The request body.
The object takes the form of:

{ # Poll Airflow Command request.
&quot;executionId&quot;: &quot;A String&quot;, # The unique ID of the command execution.
&quot;nextLineNumber&quot;: 42, # Line number from which new logs should be fetched.
&quot;pod&quot;: &quot;A String&quot;, # The name of the pod where the command is executed.
&quot;podNamespace&quot;: &quot;A String&quot;, # The namespace of the pod where the command is executed.
}

x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format

Returns:
An object of the form:

{ # Response to PollAirflowCommandRequest.
&quot;exitInfo&quot;: { # Information about how a command ended. # The result exit status of the command.
&quot;error&quot;: &quot;A String&quot;, # Error message. Empty if there was no error.
&quot;exitCode&quot;: 42, # The exit code from the command execution.
},
&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.
{ # Contains information about a single line from logs.
&quot;content&quot;: &quot;A String&quot;, # Text content of the log line.
&quot;lineNumber&quot;: 42, # Number of the line.
},
],
&quot;outputEnd&quot;: True or False, # Whether the command execution has finished and there is no more output.
}</pre>
</div>

<div class="method">
<code class="details" id="saveSnapshot">saveSnapshot(environment, body=None, x__xgafv=None)</code>
<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.
Expand Down Expand Up @@ -886,4 +1039,36 @@ <h3>Method Details</h3>
}</pre>
</div>

<div class="method">
<code class="details" id="stopAirflowCommand">stopAirflowCommand(environment, body=None, x__xgafv=None)</code>
<pre>Stops Airflow CLI command execution.

Args:
environment: string, The resource name of the environment in the form: &quot;projects/{projectId}/locations/{locationId}/environments/{environmentId}&quot;. (required)
body: object, The request body.
The object takes the form of:

{ # Stop Airflow Command request.
&quot;executionId&quot;: &quot;A String&quot;, # The unique ID of the command execution.
&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.
&quot;pod&quot;: &quot;A String&quot;, # The name of the pod where the command is executed.
&quot;podNamespace&quot;: &quot;A String&quot;, # The namespace of the pod where the command is executed.
}

x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format

Returns:
An object of the form:

{ # Response to StopAirflowCommandRequest.
&quot;isDone&quot;: True or False, # Whether the execution is still running.
&quot;output&quot;: [ # Output message from stopping execution request.
&quot;A String&quot;,
],
}</pre>
</div>

</body></html>

0 comments on commit 8f8081d

Please sign in to comment.