Skip to content

Commit

Permalink
fix(schema): CloudFormation Updates (awslabs#329)
Browse files Browse the repository at this point in the history
Co-authored-by: Paul Maddox <paul.maddox@gmail.com>
  • Loading branch information
github-actions[bot] and PaulMaddox committed Oct 23, 2020
1 parent 7d9869c commit 4c1362b
Show file tree
Hide file tree
Showing 91 changed files with 9,652 additions and 1,324 deletions.
126 changes: 126 additions & 0 deletions cloudformation/all.go
Expand Up @@ -92,6 +92,7 @@ import (
"github.com/awslabs/goformation/v4/cloudformation/managedblockchain"
"github.com/awslabs/goformation/v4/cloudformation/mediaconvert"
"github.com/awslabs/goformation/v4/cloudformation/medialive"
"github.com/awslabs/goformation/v4/cloudformation/mediapackage"
"github.com/awslabs/goformation/v4/cloudformation/mediastore"
"github.com/awslabs/goformation/v4/cloudformation/msk"
"github.com/awslabs/goformation/v4/cloudformation/neptune"
Expand Down Expand Up @@ -539,6 +540,11 @@ func AllResources() map[string]Resource {
"AWS::MediaLive::Channel": &medialive.Channel{},
"AWS::MediaLive::Input": &medialive.Input{},
"AWS::MediaLive::InputSecurityGroup": &medialive.InputSecurityGroup{},
"AWS::MediaPackage::Asset": &mediapackage.Asset{},
"AWS::MediaPackage::Channel": &mediapackage.Channel{},
"AWS::MediaPackage::OriginEndpoint": &mediapackage.OriginEndpoint{},
"AWS::MediaPackage::PackagingConfiguration": &mediapackage.PackagingConfiguration{},
"AWS::MediaPackage::PackagingGroup": &mediapackage.PackagingGroup{},
"AWS::MediaStore::Container": &mediastore.Container{},
"AWS::Neptune::DBCluster": &neptune.DBCluster{},
"AWS::Neptune::DBClusterParameterGroup": &neptune.DBClusterParameterGroup{},
Expand Down Expand Up @@ -10436,6 +10442,126 @@ func (t *Template) GetMediaLiveInputSecurityGroupWithName(name string) (*mediali
return nil, fmt.Errorf("resource %q of type medialive.InputSecurityGroup not found", name)
}

// GetAllMediaPackageAssetResources retrieves all mediapackage.Asset items from an AWS CloudFormation template
func (t *Template) GetAllMediaPackageAssetResources() map[string]*mediapackage.Asset {
results := map[string]*mediapackage.Asset{}
for name, untyped := range t.Resources {
switch resource := untyped.(type) {
case *mediapackage.Asset:
results[name] = resource
}
}
return results
}

// GetMediaPackageAssetWithName retrieves all mediapackage.Asset items from an AWS CloudFormation template
// whose logical ID matches the provided name. Returns an error if not found.
func (t *Template) GetMediaPackageAssetWithName(name string) (*mediapackage.Asset, error) {
if untyped, ok := t.Resources[name]; ok {
switch resource := untyped.(type) {
case *mediapackage.Asset:
return resource, nil
}
}
return nil, fmt.Errorf("resource %q of type mediapackage.Asset not found", name)
}

// GetAllMediaPackageChannelResources retrieves all mediapackage.Channel items from an AWS CloudFormation template
func (t *Template) GetAllMediaPackageChannelResources() map[string]*mediapackage.Channel {
results := map[string]*mediapackage.Channel{}
for name, untyped := range t.Resources {
switch resource := untyped.(type) {
case *mediapackage.Channel:
results[name] = resource
}
}
return results
}

// GetMediaPackageChannelWithName retrieves all mediapackage.Channel items from an AWS CloudFormation template
// whose logical ID matches the provided name. Returns an error if not found.
func (t *Template) GetMediaPackageChannelWithName(name string) (*mediapackage.Channel, error) {
if untyped, ok := t.Resources[name]; ok {
switch resource := untyped.(type) {
case *mediapackage.Channel:
return resource, nil
}
}
return nil, fmt.Errorf("resource %q of type mediapackage.Channel not found", name)
}

// GetAllMediaPackageOriginEndpointResources retrieves all mediapackage.OriginEndpoint items from an AWS CloudFormation template
func (t *Template) GetAllMediaPackageOriginEndpointResources() map[string]*mediapackage.OriginEndpoint {
results := map[string]*mediapackage.OriginEndpoint{}
for name, untyped := range t.Resources {
switch resource := untyped.(type) {
case *mediapackage.OriginEndpoint:
results[name] = resource
}
}
return results
}

// GetMediaPackageOriginEndpointWithName retrieves all mediapackage.OriginEndpoint items from an AWS CloudFormation template
// whose logical ID matches the provided name. Returns an error if not found.
func (t *Template) GetMediaPackageOriginEndpointWithName(name string) (*mediapackage.OriginEndpoint, error) {
if untyped, ok := t.Resources[name]; ok {
switch resource := untyped.(type) {
case *mediapackage.OriginEndpoint:
return resource, nil
}
}
return nil, fmt.Errorf("resource %q of type mediapackage.OriginEndpoint not found", name)
}

// GetAllMediaPackagePackagingConfigurationResources retrieves all mediapackage.PackagingConfiguration items from an AWS CloudFormation template
func (t *Template) GetAllMediaPackagePackagingConfigurationResources() map[string]*mediapackage.PackagingConfiguration {
results := map[string]*mediapackage.PackagingConfiguration{}
for name, untyped := range t.Resources {
switch resource := untyped.(type) {
case *mediapackage.PackagingConfiguration:
results[name] = resource
}
}
return results
}

// GetMediaPackagePackagingConfigurationWithName retrieves all mediapackage.PackagingConfiguration items from an AWS CloudFormation template
// whose logical ID matches the provided name. Returns an error if not found.
func (t *Template) GetMediaPackagePackagingConfigurationWithName(name string) (*mediapackage.PackagingConfiguration, error) {
if untyped, ok := t.Resources[name]; ok {
switch resource := untyped.(type) {
case *mediapackage.PackagingConfiguration:
return resource, nil
}
}
return nil, fmt.Errorf("resource %q of type mediapackage.PackagingConfiguration not found", name)
}

// GetAllMediaPackagePackagingGroupResources retrieves all mediapackage.PackagingGroup items from an AWS CloudFormation template
func (t *Template) GetAllMediaPackagePackagingGroupResources() map[string]*mediapackage.PackagingGroup {
results := map[string]*mediapackage.PackagingGroup{}
for name, untyped := range t.Resources {
switch resource := untyped.(type) {
case *mediapackage.PackagingGroup:
results[name] = resource
}
}
return results
}

// GetMediaPackagePackagingGroupWithName retrieves all mediapackage.PackagingGroup items from an AWS CloudFormation template
// whose logical ID matches the provided name. Returns an error if not found.
func (t *Template) GetMediaPackagePackagingGroupWithName(name string) (*mediapackage.PackagingGroup, error) {
if untyped, ok := t.Resources[name]; ok {
switch resource := untyped.(type) {
case *mediapackage.PackagingGroup:
return resource, nil
}
}
return nil, fmt.Errorf("resource %q of type mediapackage.PackagingGroup not found", name)
}

// GetAllMediaStoreContainerResources retrieves all mediastore.Container items from an AWS CloudFormation template
func (t *Template) GetAllMediaStoreContainerResources() map[string]*mediastore.Container {
results := map[string]*mediastore.Container{}
Expand Down
5 changes: 0 additions & 5 deletions cloudformation/amazonmq/aws-amazonmq-broker.go
Expand Up @@ -57,11 +57,6 @@ type Broker struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amazonmq-broker.html#cfn-amazonmq-broker-hostinstancetype
HostInstanceType string `json:"HostInstanceType,omitempty"`

// LdapMetadata AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amazonmq-broker.html#cfn-amazonmq-broker-ldapmetadata
LdapMetadata *Broker_LdapMetadata `json:"LdapMetadata,omitempty"`

// LdapServerMetadata AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amazonmq-broker.html#cfn-amazonmq-broker-ldapservermetadata
Expand Down
5 changes: 5 additions & 0 deletions cloudformation/appsync/aws-appsync-apikey.go
Expand Up @@ -17,6 +17,11 @@ type ApiKey struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-apikey.html#cfn-appsync-apikey-apiid
ApiId string `json:"ApiId,omitempty"`

// ApiKeyId AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-apikey.html#cfn-appsync-apikey-apikeyid
ApiKeyId string `json:"ApiKeyId,omitempty"`

// Description AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-apikey.html#cfn-appsync-apikey-description
Expand Down
5 changes: 5 additions & 0 deletions cloudformation/appsync/aws-appsync-functionconfiguration.go
Expand Up @@ -57,6 +57,11 @@ type FunctionConfiguration struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-functionconfiguration.html#cfn-appsync-functionconfiguration-responsemappingtemplates3location
ResponseMappingTemplateS3Location string `json:"ResponseMappingTemplateS3Location,omitempty"`

// SyncConfig AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-functionconfiguration.html#cfn-appsync-functionconfiguration-syncconfig
SyncConfig *FunctionConfiguration_SyncConfig `json:"SyncConfig,omitempty"`

// AWSCloudFormationDeletionPolicy represents a CloudFormation DeletionPolicy
AWSCloudFormationDeletionPolicy policies.DeletionPolicy `json:"-"`

Expand Down
@@ -0,0 +1,35 @@
package appsync

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
)

// FunctionConfiguration_LambdaConflictHandlerConfig AWS CloudFormation Resource (AWS::AppSync::FunctionConfiguration.LambdaConflictHandlerConfig)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-functionconfiguration-lambdaconflicthandlerconfig.html
type FunctionConfiguration_LambdaConflictHandlerConfig struct {

// LambdaConflictHandlerArn AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-functionconfiguration-lambdaconflicthandlerconfig.html#cfn-appsync-functionconfiguration-lambdaconflicthandlerconfig-lambdaconflicthandlerarn
LambdaConflictHandlerArn string `json:"LambdaConflictHandlerArn,omitempty"`

// AWSCloudFormationDeletionPolicy represents a CloudFormation DeletionPolicy
AWSCloudFormationDeletionPolicy policies.DeletionPolicy `json:"-"`

// AWSCloudFormationUpdateReplacePolicy represents a CloudFormation UpdateReplacePolicy
AWSCloudFormationUpdateReplacePolicy policies.UpdateReplacePolicy `json:"-"`

// AWSCloudFormationDependsOn stores the logical ID of the resources to be created before this resource
AWSCloudFormationDependsOn []string `json:"-"`

// AWSCloudFormationMetadata stores structured data associated with this resource
AWSCloudFormationMetadata map[string]interface{} `json:"-"`

// AWSCloudFormationCondition stores the logical ID of the condition that must be satisfied for this resource to be created
AWSCloudFormationCondition string `json:"-"`
}

// AWSCloudFormationType returns the AWS CloudFormation resource type
func (r *FunctionConfiguration_LambdaConflictHandlerConfig) AWSCloudFormationType() string {
return "AWS::AppSync::FunctionConfiguration.LambdaConflictHandlerConfig"
}
@@ -0,0 +1,45 @@
package appsync

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
)

// FunctionConfiguration_SyncConfig AWS CloudFormation Resource (AWS::AppSync::FunctionConfiguration.SyncConfig)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-functionconfiguration-syncconfig.html
type FunctionConfiguration_SyncConfig struct {

// ConflictDetection AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-functionconfiguration-syncconfig.html#cfn-appsync-functionconfiguration-syncconfig-conflictdetection
ConflictDetection string `json:"ConflictDetection,omitempty"`

// ConflictHandler AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-functionconfiguration-syncconfig.html#cfn-appsync-functionconfiguration-syncconfig-conflicthandler
ConflictHandler string `json:"ConflictHandler,omitempty"`

// LambdaConflictHandlerConfig AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-functionconfiguration-syncconfig.html#cfn-appsync-functionconfiguration-syncconfig-lambdaconflicthandlerconfig
LambdaConflictHandlerConfig *FunctionConfiguration_LambdaConflictHandlerConfig `json:"LambdaConflictHandlerConfig,omitempty"`

// AWSCloudFormationDeletionPolicy represents a CloudFormation DeletionPolicy
AWSCloudFormationDeletionPolicy policies.DeletionPolicy `json:"-"`

// AWSCloudFormationUpdateReplacePolicy represents a CloudFormation UpdateReplacePolicy
AWSCloudFormationUpdateReplacePolicy policies.UpdateReplacePolicy `json:"-"`

// AWSCloudFormationDependsOn stores the logical ID of the resources to be created before this resource
AWSCloudFormationDependsOn []string `json:"-"`

// AWSCloudFormationMetadata stores structured data associated with this resource
AWSCloudFormationMetadata map[string]interface{} `json:"-"`

// AWSCloudFormationCondition stores the logical ID of the condition that must be satisfied for this resource to be created
AWSCloudFormationCondition string `json:"-"`
}

// AWSCloudFormationType returns the AWS CloudFormation resource type
func (r *FunctionConfiguration_SyncConfig) AWSCloudFormationType() string {
return "AWS::AppSync::FunctionConfiguration.SyncConfig"
}
5 changes: 5 additions & 0 deletions cloudformation/athena/aws-athena-namedquery.go
Expand Up @@ -32,6 +32,11 @@ type NamedQuery struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-athena-namedquery.html#cfn-athena-namedquery-querystring
QueryString string `json:"QueryString,omitempty"`

// WorkGroup AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-athena-namedquery.html#cfn-athena-namedquery-workgroup
WorkGroup string `json:"WorkGroup,omitempty"`

// AWSCloudFormationDeletionPolicy represents a CloudFormation DeletionPolicy
AWSCloudFormationDeletionPolicy policies.DeletionPolicy `json:"-"`

Expand Down
Expand Up @@ -22,6 +22,11 @@ type AutoScalingGroup struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-availabilityzones
AvailabilityZones []string `json:"AvailabilityZones,omitempty"`

// CapacityRebalance AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-capacityrebalance
CapacityRebalance bool `json:"CapacityRebalance,omitempty"`

// Cooldown AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-cooldown
Expand Down
Expand Up @@ -13,6 +13,11 @@ type AutoScalingGroup_LaunchTemplateOverrides struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-instancetype
InstanceType string `json:"InstanceType,omitempty"`

// LaunchTemplateSpecification AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-launchtemplatespecification
LaunchTemplateSpecification *AutoScalingGroup_LaunchTemplateSpecification `json:"LaunchTemplateSpecification,omitempty"`

// WeightedCapacity AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-weightedcapacity
Expand Down
Expand Up @@ -77,6 +77,11 @@ type LaunchConfiguration struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cfn-autoscaling-launchconfig-launchconfigurationname
LaunchConfigurationName string `json:"LaunchConfigurationName,omitempty"`

// MetadataOptions AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cfn-autoscaling-launchconfig-metadataoptions
MetadataOptions *LaunchConfiguration_MetadataOption `json:"MetadataOptions,omitempty"`

// PlacementTenancy AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cfn-as-launchconfig-placementtenancy
Expand Down
@@ -0,0 +1,45 @@
package autoscaling

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
)

// LaunchConfiguration_MetadataOption AWS CloudFormation Resource (AWS::AutoScaling::LaunchConfiguration.MetadataOption)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfig-metadataoption.html
type LaunchConfiguration_MetadataOption struct {

// HttpEndpoint AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfig-metadataoption.html#cfn-autoscaling-launchconfig-metadataoption-httpendpoint
HttpEndpoint string `json:"HttpEndpoint,omitempty"`

// HttpPutResponseHopLimit AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfig-metadataoption.html#cfn-autoscaling-launchconfig-metadataoption-httpputresponsehoplimit
HttpPutResponseHopLimit int `json:"HttpPutResponseHopLimit,omitempty"`

// HttpTokens AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfig-metadataoption.html#cfn-autoscaling-launchconfig-metadataoption-httptokens
HttpTokens string `json:"HttpTokens,omitempty"`

// AWSCloudFormationDeletionPolicy represents a CloudFormation DeletionPolicy
AWSCloudFormationDeletionPolicy policies.DeletionPolicy `json:"-"`

// AWSCloudFormationUpdateReplacePolicy represents a CloudFormation UpdateReplacePolicy
AWSCloudFormationUpdateReplacePolicy policies.UpdateReplacePolicy `json:"-"`

// AWSCloudFormationDependsOn stores the logical ID of the resources to be created before this resource
AWSCloudFormationDependsOn []string `json:"-"`

// AWSCloudFormationMetadata stores structured data associated with this resource
AWSCloudFormationMetadata map[string]interface{} `json:"-"`

// AWSCloudFormationCondition stores the logical ID of the condition that must be satisfied for this resource to be created
AWSCloudFormationCondition string `json:"-"`
}

// AWSCloudFormationType returns the AWS CloudFormation resource type
func (r *LaunchConfiguration_MetadataOption) AWSCloudFormationType() string {
return "AWS::AutoScaling::LaunchConfiguration.MetadataOption"
}
5 changes: 5 additions & 0 deletions cloudformation/batch/aws-batch-computeenvironment.go
Expand Up @@ -32,6 +32,11 @@ type ComputeEnvironment struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-computeenvironment.html#cfn-batch-computeenvironment-state
State string `json:"State,omitempty"`

// Tags AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-computeenvironment.html#cfn-batch-computeenvironment-tags
Tags interface{} `json:"Tags,omitempty"`

// Type AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-computeenvironment.html#cfn-batch-computeenvironment-type
Expand Down

0 comments on commit 4c1362b

Please sign in to comment.