Skip to content

Commit

Permalink
feat(client-m2): Adds an optional create-only 'roleArn' property to A…
Browse files Browse the repository at this point in the history
…pplication resources. Enables PS and PO data set org types.
  • Loading branch information
awstools committed May 31, 2023
1 parent 913f68e commit eb955ab
Show file tree
Hide file tree
Showing 14 changed files with 831 additions and 383 deletions.
5 changes: 3 additions & 2 deletions clients/client-m2/src/commands/CreateApplicationCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export interface CreateApplicationCommandOutput extends CreateApplicationRespons

/**
* @public
* <p>Creates a new application with given parameters. Requires an existing runtime environment and
* application definition file.</p>
* <p>Creates a new application with given parameters. Requires an existing runtime
* environment and application definition file.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand All @@ -57,6 +57,7 @@ export interface CreateApplicationCommandOutput extends CreateApplicationRespons
* },
* clientToken: "STRING_VALUE",
* kmsKeyId: "STRING_VALUE",
* roleArn: "STRING_VALUE",
* };
* const command = new CreateApplicationCommand(input);
* const response = await client.send(command);
Expand Down
11 changes: 11 additions & 0 deletions clients/client-m2/src/commands/CreateDataSetImportTaskCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@ export interface CreateDataSetImportTaskCommandOutput extends CreateDataSetImpor
* limit: Number("int"),
* rollDisposition: "STRING_VALUE",
* },
* po: { // PoAttributes
* format: "STRING_VALUE", // required
* encoding: "STRING_VALUE",
* memberFileExtensions: [ // String20List // required
* "STRING_VALUE",
* ],
* },
* ps: { // PsAttributes
* format: "STRING_VALUE", // required
* encoding: "STRING_VALUE",
* },
* },
* relativePath: "STRING_VALUE",
* recordLength: { // RecordLength
Expand Down
3 changes: 2 additions & 1 deletion clients/client-m2/src/commands/CreateDeploymentCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ export interface CreateDeploymentCommandOutput extends CreateDeploymentResponse,

/**
* @public
* <p>Creates and starts a deployment to deploy an application into a runtime environment.</p>
* <p>Creates and starts a deployment to deploy an application into a runtime
* environment.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ export interface DeleteApplicationFromEnvironmentCommandOutput

/**
* @public
* <p>Deletes a specific application from the specific runtime environment where it was previously
* deployed. You cannot delete a runtime environment using DeleteEnvironment if any application has
* ever been deployed to it. This API removes the association of the application with the
* runtime environment so you can delete the environment smoothly.</p>
* <p>Deletes a specific application from the specific runtime environment where it was
* previously deployed. You cannot delete a runtime environment using DeleteEnvironment if any
* application has ever been deployed to it. This API removes the association of the
* application with the runtime environment so you can delete the environment smoothly.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
5 changes: 3 additions & 2 deletions clients/client-m2/src/commands/DeleteEnvironmentCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ export interface DeleteEnvironmentCommandOutput extends DeleteEnvironmentRespons

/**
* @public
* <p>Deletes a specific runtime environment. The environment cannot contain deployed applications. If
* it does, you must delete those applications before you delete the environment.</p>
* <p>Deletes a specific runtime environment. The environment cannot contain deployed
* applications. If it does, you must delete those applications before you delete the
* environment.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
1 change: 1 addition & 0 deletions clients/client-m2/src/commands/GetApplicationCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export interface GetApplicationCommandOutput extends GetApplicationResponse, __M
* // loadBalancerDnsName: "STRING_VALUE",
* // statusReason: "STRING_VALUE",
* // kmsKeyId: "STRING_VALUE",
* // roleArn: "STRING_VALUE",
* // };
*
* ```
Expand Down
8 changes: 8 additions & 0 deletions clients/client-m2/src/commands/GetDataSetDetailsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ export interface GetDataSetDetailsCommandOutput extends GetDataSetDetailsRespons
* // limit: Number("int"),
* // rollDisposition: "STRING_VALUE",
* // },
* // po: { // PoDetailAttributes
* // format: "STRING_VALUE", // required
* // encoding: "STRING_VALUE", // required
* // },
* // ps: { // PsDetailAttributes
* // format: "STRING_VALUE", // required
* // encoding: "STRING_VALUE", // required
* // },
* // },
* // recordLength: Number("int"),
* // location: "STRING_VALUE",
Expand Down
5 changes: 3 additions & 2 deletions clients/client-m2/src/commands/ListApplicationsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export interface ListApplicationsCommandOutput extends ListApplicationsResponse,
/**
* @public
* <p>Lists the applications associated with a specific Amazon Web Services account. You can provide the
* unique identifier of a specific runtime environment in a query parameter to see all applications
* associated with that environment.</p>
* unique identifier of a specific runtime environment in a query parameter to see all
* applications associated with that environment.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -70,6 +70,7 @@ export interface ListApplicationsCommandOutput extends ListApplicationsResponse,
* // lastStartTime: new Date("TIMESTAMP"),
* // versionStatus: "STRING_VALUE",
* // deploymentStatus: "STRING_VALUE",
* // roleArn: "STRING_VALUE",
* // },
* // ],
* // nextToken: "STRING_VALUE",
Expand Down
4 changes: 2 additions & 2 deletions clients/client-m2/src/commands/ListDataSetsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export interface ListDataSetsCommandOutput extends ListDataSetsResponse, __Metad
/**
* @public
* <p>Lists the data sets imported for a specific application. In Amazon Web Services Mainframe Modernization, data sets are
* associated with applications deployed on runtime environments. This is known as importing data
* sets. Currently, Amazon Web Services Mainframe Modernization can import data sets into catalogs using <a href="https://docs.aws.amazon.com/m2/latest/APIReference/API_CreateDataSetImportTask.html">CreateDataSetImportTask</a>.</p>
* associated with applications deployed on runtime environments. This is known as importing
* data sets. Currently, Amazon Web Services Mainframe Modernization can import data sets into catalogs using <a href="https://docs.aws.amazon.com/m2/latest/APIReference/API_CreateDataSetImportTask.html">CreateDataSetImportTask</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
2 changes: 1 addition & 1 deletion clients/client-m2/src/endpoint/EndpointParameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const resolveClientEndpointParameters = <T>(
};

export interface EndpointParameters extends __EndpointParameters {
Region: string;
Region?: string;
UseDualStack?: boolean;
UseFIPS?: boolean;
Endpoint?: string;
Expand Down
39 changes: 20 additions & 19 deletions clients/client-m2/src/endpoint/ruleset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,25 @@ import { RuleSetObject } from "@aws-sdk/util-endpoints";
or see "smithy.rules#endpointRuleSet"
in codegen/sdk-codegen/aws-models/m2.json */

const q="fn",
r="argv",
s="ref";
const a=true,
b=false,
c="String",
d="PartitionResult",
e="tree",
f="error",
g="endpoint",
h={"required":true,"default":false,"type":"Boolean"},
i={[s]:"Endpoint"},
j={[q]:"booleanEquals",[r]:[{[s]:"UseFIPS"},true]},
k={[q]:"booleanEquals",[r]:[{[s]:"UseDualStack"},true]},
l={},
m={[q]:"booleanEquals",[r]:[true,{[q]:"getAttr",[r]:[{[s]:d},"supportsFIPS"]}]},
n={[q]:"booleanEquals",[r]:[true,{[q]:"getAttr",[r]:[{[s]:d},"supportsDualStack"]}]},
const q="required",
r="fn",
s="argv",
t="ref";
const a="isSet",
b="tree",
c="error",
d="endpoint",
e="PartitionResult",
f={[q]:false,"type":"String"},
g={[q]:true,"default":false,"type":"Boolean"},
h={[t]:"Endpoint"},
i={[r]:"booleanEquals",[s]:[{[t]:"UseFIPS"},true]},
j={[r]:"booleanEquals",[s]:[{[t]:"UseDualStack"},true]},
k={},
l={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsFIPS"]}]},
m={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsDualStack"]}]},
n=[i],
o=[j],
p=[k];
const _data={version:"1.0",parameters:{Region:{required:a,type:c},UseDualStack:h,UseFIPS:h,Endpoint:{required:b,type:c}},rules:[{conditions:[{[q]:"aws.partition",[r]:[{[s]:"Region"}],assign:d}],type:e,rules:[{conditions:[{[q]:"isSet",[r]:[i]}],type:e,rules:[{conditions:o,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:f},{type:e,rules:[{conditions:p,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:f},{endpoint:{url:i,properties:l,headers:l},type:g}]}]},{conditions:[j,k],type:e,rules:[{conditions:[m,n],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://m2-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:g}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:f}]},{conditions:o,type:e,rules:[{conditions:[m],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://m2-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:g}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:f}]},{conditions:p,type:e,rules:[{conditions:[n],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://m2.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:g}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:f}]},{type:e,rules:[{endpoint:{url:"https://m2.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:g}]}]}]};
p=[{[t]:"Region"}];
const _data={version:"1.0",parameters:{Region:f,UseDualStack:g,UseFIPS:g,Endpoint:f},rules:[{conditions:[{[r]:a,[s]:[h]}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{type:b,rules:[{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:h,properties:k,headers:k},type:d}]}]},{type:b,rules:[{conditions:[{[r]:a,[s]:p}],type:b,rules:[{conditions:[{[r]:"aws.partition",[s]:p,assign:e}],type:b,rules:[{conditions:[i,j],type:b,rules:[{conditions:[l,m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://m2-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[l],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://m2-fips.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://m2.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{type:b,rules:[{endpoint:{url:"https://m2.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}]};
export const ruleSet: RuleSetObject = _data;
Loading

0 comments on commit eb955ab

Please sign in to comment.