Skip to content

Commit

Permalink
feat(client-mwaa): This Amazon MWAA release adds support for customer…
Browse files Browse the repository at this point in the history
…-managed VPC endpoints. This lets you choose whether to create, and manage your environment's VPC endpoints, or to have Amazon MWAA create, and manage them for you.
  • Loading branch information
awstools committed Nov 15, 2023
1 parent 4ae18d4 commit 9cd2e86
Show file tree
Hide file tree
Showing 5 changed files with 144 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export interface CreateEnvironmentCommandOutput extends CreateEnvironmentOutput,
* WebserverAccessMode: "STRING_VALUE",
* MinWorkers: Number("int"),
* Schedulers: Number("int"),
* EndpointManagement: "STRING_VALUE",
* };
* const command = new CreateEnvironmentCommand(input);
* const response = await client.send(command);
Expand Down
4 changes: 4 additions & 0 deletions clients/client-mwaa/src/commands/GetEnvironmentCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ export interface GetEnvironmentCommandOutput extends GetEnvironmentOutput, __Met
* // WebserverAccessMode: "STRING_VALUE",
* // MinWorkers: Number("int"),
* // Schedulers: Number("int"),
* // WebserverVpcEndpointService: "STRING_VALUE",
* // DatabaseVpcEndpointService: "STRING_VALUE",
* // CeleryExecutorQueue: "STRING_VALUE",
* // EndpointManagement: "STRING_VALUE",
* // },
* // };
*
Expand Down
65 changes: 61 additions & 4 deletions clients/client-mwaa/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,20 @@ export class ResourceNotFoundException extends __BaseException {
}
}

/**
* @public
* @enum
*/
export const EndpointManagement = {
CUSTOMER: "CUSTOMER",
SERVICE: "SERVICE",
} as const;

/**
* @public
*/
export type EndpointManagement = (typeof EndpointManagement)[keyof typeof EndpointManagement];

/**
* @public
* @enum
Expand Down Expand Up @@ -291,7 +305,8 @@ export interface CreateEnvironmentInput {
* @public
* <p>The Apache Airflow version for your environment. If no value is specified, it defaults to the latest version.
* For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/airflow-versions.html">Apache Airflow versions on Amazon Managed Workflows for Apache Airflow (MWAA)</a>.</p>
* <p>Valid values: <code>1.10.12</code>, <code>2.0.2</code>, <code>2.2.2</code>, <code>2.4.3</code>, <code>2.5.1</code>, <code>2.6.3</code>, <code>2.7.2</code>.</p>
* <p>Valid values: <code>1.10.12</code>, <code>2.0.2</code>, <code>2.2.2</code>, <code>2.4.3</code>, <code>2.5.1</code>, <code>2.6.3</code>, <code>2.7.2</code>
* </p>
*/
AirflowVersion?: string;

Expand All @@ -315,7 +330,7 @@ export interface CreateEnvironmentInput {

/**
* @public
* <p>The Apache Airflow <i>Web server</i> access mode. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-networking.html">Apache Airflow access modes</a>.</p>
* <p>Defines the access mode for the Apache Airflow <i>web server</i>. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-networking.html">Apache Airflow access modes</a>.</p>
*/
WebserverAccessMode?: WebserverAccessMode;

Expand All @@ -338,6 +353,15 @@ export interface CreateEnvironmentInput {
* </ul>
*/
Schedulers?: number;

/**
* @public
* <p>Defines whether the VPC endpoints configured for the environment are created, and managed, by the customer or by Amazon MWAA. If set to <code>SERVICE</code>, Amazon MWAA will create and manage the required VPC endpoints in
* your VPC. If set to <code>CUSTOMER</code>, you must create, and manage, the VPC endpoints for your VPC. If you choose to create an environment in a shared VPC, you must set this value to <code>CUSTOMER</code>.
* In a shared VPC deployment, the environment will remain in <code>PENDING</code> status until you create the VPC endpoints. If you do not take action to
* create the endpoints within 72 hours, the status will change to <code>CREATE_FAILED</code>. You can delete the failed environment and create a new one.</p>
*/
EndpointManagement?: EndpointManagement;
}

/**
Expand Down Expand Up @@ -580,6 +604,7 @@ export const EnvironmentStatus = {
CREATING_SNAPSHOT: "CREATING_SNAPSHOT",
DELETED: "DELETED",
DELETING: "DELETING",
PENDING: "PENDING",
ROLLING_BACK: "ROLLING_BACK",
UNAVAILABLE: "UNAVAILABLE",
UPDATE_FAILED: "UPDATE_FAILED",
Expand All @@ -604,7 +629,8 @@ export interface Environment {

/**
* @public
* <p>The status of the Amazon MWAA environment. Valid values:</p>
* <p>The status of the Amazon MWAA environment.</p>
* <p>Valid values:</p>
* <ul>
* <li>
* <p>
Expand All @@ -626,6 +652,11 @@ export interface Environment {
* </li>
* <li>
* <p>
* <code>PENDING</code> - Indicates the request was successful, but the process to create the environment is paused until you create the required
* VPC endpoints in your VPC. After you create the VPC endpoints, the process resumes.</p>
* </li>
* <li>
* <p>
* <code>UPDATING</code> - Indicates the request to update the environment is in progress.</p>
* </li>
* <li>
Expand Down Expand Up @@ -825,7 +856,7 @@ export interface Environment {

/**
* @public
* <p>The Apache Airflow <i>Web server</i> access mode. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-networking.html">Apache Airflow access modes</a>.</p>
* <p>The Apache Airflow <i>web server</i> access mode. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-networking.html">Apache Airflow access modes</a>.</p>
*/
WebserverAccessMode?: WebserverAccessMode;

Expand All @@ -840,6 +871,32 @@ export interface Environment {
* <p>The number of Apache Airflow schedulers that run in your Amazon MWAA environment.</p>
*/
Schedulers?: number;

/**
* @public
* <p>The VPC endpoint for the environment's web server.</p>
*/
WebserverVpcEndpointService?: string;

/**
* @public
* <p>The VPC endpoint for the environment's Amazon RDS database.</p>
*/
DatabaseVpcEndpointService?: string;

/**
* @public
* <p>The queue ARN for the environment's <a href="https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/executor/celery.html">Celery Executor</a>. Amazon MWAA uses a Celery Executor
* to distribute tasks across multiple workers. When you create an environment in a shared VPC, you must provide access to the Celery Executor queue from your VPC.</p>
*/
CeleryExecutorQueue?: string;

/**
* @public
* <p>Defines whether the VPC endpoints configured for the environment are created, and managed, by the customer or by Amazon MWAA. If set to <code>SERVICE</code>, Amazon MWAA will create and manage the required VPC endpoints in
* your VPC. If set to <code>CUSTOMER</code>, you must create, and manage, the VPC endpoints in your VPC.</p>
*/
EndpointManagement?: EndpointManagement;
}

/**
Expand Down
5 changes: 5 additions & 0 deletions clients/client-mwaa/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export const se_CreateEnvironmentCommand = async (
AirflowConfigurationOptions: (_) => _json(_),
AirflowVersion: [],
DagS3Path: [],
EndpointManagement: [],
EnvironmentClass: [],
ExecutionRoleArn: [],
KmsKey: [],
Expand Down Expand Up @@ -1179,8 +1180,11 @@ const de_Environment = (output: any, context: __SerdeContext): Environment => {
AirflowConfigurationOptions: _json,
AirflowVersion: __expectString,
Arn: __expectString,
CeleryExecutorQueue: __expectString,
CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
DagS3Path: __expectString,
DatabaseVpcEndpointService: __expectString,
EndpointManagement: __expectString,
EnvironmentClass: __expectString,
ExecutionRoleArn: __expectString,
KmsKey: __expectString,
Expand All @@ -1203,6 +1207,7 @@ const de_Environment = (output: any, context: __SerdeContext): Environment => {
Tags: _json,
WebserverAccessMode: __expectString,
WebserverUrl: __expectString,
WebserverVpcEndpointService: __expectString,
WeeklyMaintenanceWindowStart: __expectString,
}) as any;
};
Expand Down
Loading

0 comments on commit 9cd2e86

Please sign in to comment.