Skip to content

Commit

Permalink
feat(cfnspec): cloudformation spec v58.0.0 (#19153)
Browse files Browse the repository at this point in the history
* feat: cloudformation spec v58.0.0

* Connection is now typed so need to change casing

Co-authored-by: AWS CDK Team <aws-cdk@amazon.com>
Co-authored-by: Rico Huijbers <rix0rrr@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Feb 27, 2022
1 parent 9961257 commit a6b0a10
Show file tree
Hide file tree
Showing 189 changed files with 767 additions and 230 deletions.
62 changes: 31 additions & 31 deletions packages/@aws-cdk/aws-events/lib/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ export abstract class Authorization {
return {
authorizationType: AuthorizationType.API_KEY,
authParameters: {
ApiKeyAuthParameters: {
ApiKeyName: apiKeyName,
ApiKeyValue: apiKeyValue,
apiKeyAuthParameters: {
apiKeyName: apiKeyName,
apiKeyValue: apiKeyValue.toString(),
},
},
} as CfnConnection.AuthParametersProperty,
};
}
}();
Expand All @@ -84,11 +84,11 @@ export abstract class Authorization {
return {
authorizationType: AuthorizationType.BASIC,
authParameters: {
BasicAuthParameters: {
Username: username,
Password: password,
basicAuthParameters: {
username: username,
password: password.toString(),
},
},
} as CfnConnection.AuthParametersProperty,
};
}
}();
Expand All @@ -107,20 +107,20 @@ export abstract class Authorization {
return {
authorizationType: AuthorizationType.OAUTH_CLIENT_CREDENTIALS,
authParameters: {
OAuthParameters: {
AuthorizationEndpoint: props.authorizationEndpoint,
ClientParameters: {
ClientID: props.clientId,
ClientSecret: props.clientSecret,
oAuthParameters: {
authorizationEndpoint: props.authorizationEndpoint,
clientParameters: {
clientId: props.clientId,
clientSecret: props.clientSecret.toString(),
},
HttpMethod: props.httpMethod,
OAuthHttpParameters: {
BodyParameters: renderHttpParameters(props.bodyParameters),
HeaderParameters: renderHttpParameters(props.headerParameters),
QueryStringParameters: renderHttpParameters(props.queryStringParameters),
httpMethod: props.httpMethod,
oAuthHttpParameters: {
bodyParameters: renderHttpParameters(props.bodyParameters),
headerParameters: renderHttpParameters(props.headerParameters),
queryStringParameters: renderHttpParameters(props.queryStringParameters),
},
},
},
} as CfnConnection.AuthParametersProperty,
};
}
}();
Expand Down Expand Up @@ -197,9 +197,9 @@ export abstract class HttpParameter {
return new class extends HttpParameter {
public _render(name: string) {
return {
Key: name,
Value: value,
};
key: name,
value,
} as CfnConnection.ParameterProperty;
}
}();
}
Expand All @@ -211,10 +211,10 @@ export abstract class HttpParameter {
return new class extends HttpParameter {
public _render(name: string) {
return {
Key: name,
Value: value,
IsSecretValue: true,
};
key: name,
value: value.toString(),
isValueSecret: true,
} as CfnConnection.ParameterProperty;
}
}();
}
Expand Down Expand Up @@ -345,16 +345,16 @@ export class Connection extends Resource implements IConnection {
const authBind = props.authorization._bind();

const invocationHttpParameters = !!props.headerParameters || !!props.queryStringParameters || !!props.bodyParameters ? {
BodyParameters: renderHttpParameters(props.bodyParameters),
HeaderParameters: renderHttpParameters(props.headerParameters),
QueryStringParameters: renderHttpParameters(props.queryStringParameters),
bodyParameters: renderHttpParameters(props.bodyParameters),
headerParameters: renderHttpParameters(props.headerParameters),
queryStringParameters: renderHttpParameters(props.queryStringParameters),
} : undefined;

let connection = new CfnConnection(this, 'Connection', {
authorizationType: authBind.authorizationType,
authParameters: {
...authBind.authParameters,
InvocationHttpParameters: invocationHttpParameters,
invocationHttpParameters: invocationHttpParameters,
},
description: props.description,
name: this.physicalName,
Expand Down Expand Up @@ -415,7 +415,7 @@ enum AuthorizationType {
OAUTH_CLIENT_CREDENTIALS = 'OAUTH_CLIENT_CREDENTIALS',
}

function renderHttpParameters(ps?: Record<string, HttpParameter>) {
function renderHttpParameters(ps?: Record<string, HttpParameter>): CfnConnection.ParameterProperty[] | undefined {
if (!ps || Object.keys(ps).length === 0) { return undefined; }

return Object.entries(ps).map(([name, p]) => p._render(name));
Expand Down
61 changes: 61 additions & 0 deletions packages/@aws-cdk/cfnspec/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,64 @@
# CloudFormation Resource Specification v58.0.0

## New Resource Types

* AWS::AppIntegrations::DataIntegration
* AWS::DataSync::LocationFSxLustre

## Attribute Changes

* AWS::AmplifyUIBuilder::Component CreatedAt (__deleted__)
* AWS::AmplifyUIBuilder::Component ModifiedAt (__deleted__)

## Property Changes

* AWS::AmplifyUIBuilder::Component Events (__added__)
* AWS::AmplifyUIBuilder::Component BindingProperties.Required (__changed__)
* Old: false
* New: true
* AWS::AmplifyUIBuilder::Component ComponentType.Required (__changed__)
* Old: false
* New: true
* AWS::AmplifyUIBuilder::Component Name.Required (__changed__)
* Old: false
* New: true
* AWS::AmplifyUIBuilder::Component Overrides.Required (__changed__)
* Old: false
* New: true
* AWS::AmplifyUIBuilder::Component Properties.Required (__changed__)
* Old: false
* New: true
* AWS::AmplifyUIBuilder::Component Variants.Required (__changed__)
* Old: false
* New: true
* AWS::Events::Connection AuthParameters.PrimitiveType (__deleted__)
* AWS::Events::Connection AuthParameters.Type (__added__)
* AWS::Transfer::Server PostAuthenticationLoginBanner (__added__)
* AWS::Transfer::Server PreAuthenticationLoginBanner (__added__)

## Property Type Changes

* AWS::AmplifyUIBuilder::Component.ActionParameters (__added__)
* AWS::AmplifyUIBuilder::Component.ComponentEvent (__added__)
* AWS::AmplifyUIBuilder::Component.ComponentEvents (__added__)
* AWS::AmplifyUIBuilder::Component.MutationActionSetStateParameter (__added__)
* AWS::AppFlow::Flow.SAPODataDestinationProperties (__added__)
* AWS::AppFlow::Flow.SuccessResponseHandlingConfig (__added__)
* AWS::AppMesh::Mesh.MeshServiceDiscovery (__added__)
* AWS::Events::Connection.ApiKeyAuthParameters (__added__)
* AWS::Events::Connection.AuthParameters (__added__)
* AWS::Events::Connection.BasicAuthParameters (__added__)
* AWS::Events::Connection.ClientParameters (__added__)
* AWS::Events::Connection.ConnectionHttpParameters (__added__)
* AWS::Events::Connection.OAuthParameters (__added__)
* AWS::Events::Connection.Parameter (__added__)
* AWS::AmplifyUIBuilder::Component.ComponentChild Events (__added__)
* AWS::AmplifyUIBuilder::Component.ComponentConditionProperty OperandType (__added__)
* AWS::AmplifyUIBuilder::Component.ComponentProperty ComponentName (__added__)
* AWS::AmplifyUIBuilder::Component.ComponentProperty Property (__added__)
* AWS::AppFlow::Flow.DestinationConnectorProperties SAPOData (__added__)


# CloudFormation Resource Specification v57.0.0

## New Resource Types
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cfnspec/cfn.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
57.0.0
58.0.0
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "57.0.0",
"$version": "58.0.0",
"PropertyTypes": {
"AWS::ACMPCA::Certificate.ApiPassthrough": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificate-apipassthrough.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "57.0.0",
"$version": "58.0.0",
"PropertyTypes": {},
"ResourceTypes": {
"AWS::APS::RuleGroupsNamespace": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "57.0.0",
"$version": "58.0.0",
"PropertyTypes": {
"AWS::AccessAnalyzer::Analyzer.ArchiveRule": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-accessanalyzer-analyzer-archiverule.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "57.0.0",
"$version": "58.0.0",
"PropertyTypes": {
"AWS::AmazonMQ::Broker.ConfigurationId": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-configurationid.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "57.0.0",
"$version": "58.0.0",
"PropertyTypes": {
"AWS::Amplify::App.AutoBranchCreationConfig": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html",
Expand Down
Loading

0 comments on commit a6b0a10

Please sign in to comment.