Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CloudFormation Updates #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 126 additions & 0 deletions cloudformation/all.go
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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"
}
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Loading