Skip to content

Commit

Permalink
fix(schema): CloudFormation Updates (awslabs#381)
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 authored Jun 10, 2021
1 parent d32a503 commit 0714ecf
Show file tree
Hide file tree
Showing 39 changed files with 4,660 additions and 955 deletions.
151 changes: 151 additions & 0 deletions cloudformation/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ import (
"github.com/awslabs/goformation/v4/cloudformation/lakeformation"
"github.com/awslabs/goformation/v4/cloudformation/lambda"
"github.com/awslabs/goformation/v4/cloudformation/licensemanager"
"github.com/awslabs/goformation/v4/cloudformation/location"
"github.com/awslabs/goformation/v4/cloudformation/logs"
"github.com/awslabs/goformation/v4/cloudformation/lookoutmetrics"
"github.com/awslabs/goformation/v4/cloudformation/lookoutvision"
Expand Down Expand Up @@ -669,6 +670,12 @@ func AllResources() map[string]Resource {
"AWS::Lambda::Version": &lambda.Version{},
"AWS::LicenseManager::Grant": &licensemanager.Grant{},
"AWS::LicenseManager::License": &licensemanager.License{},
"AWS::Location::GeofenceCollection": &location.GeofenceCollection{},
"AWS::Location::Map": &location.Map{},
"AWS::Location::PlaceIndex": &location.PlaceIndex{},
"AWS::Location::RouteCalculator": &location.RouteCalculator{},
"AWS::Location::Tracker": &location.Tracker{},
"AWS::Location::TrackerConsumer": &location.TrackerConsumer{},
"AWS::Logs::Destination": &logs.Destination{},
"AWS::Logs::LogGroup": &logs.LogGroup{},
"AWS::Logs::LogStream": &logs.LogStream{},
Expand Down Expand Up @@ -12939,6 +12946,150 @@ func (t *Template) GetLicenseManagerLicenseWithName(name string) (*licensemanage
return nil, fmt.Errorf("resource %q of type licensemanager.License not found", name)
}

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

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

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

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

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

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

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

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

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

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

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

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

// GetAllLogsDestinationResources retrieves all logs.Destination items from an AWS CloudFormation template
func (t *Template) GetAllLogsDestinationResources() map[string]*logs.Destination {
results := map[string]*logs.Destination{}
Expand Down
2 changes: 1 addition & 1 deletion cloudformation/apigatewayv2/aws-apigatewayv2-authorizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type Authorizer struct {
EnableSimpleResponses bool `json:"EnableSimpleResponses,omitempty"`

// IdentitySource AWS CloudFormation Property
// Required: true
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-identitysource
IdentitySource []string `json:"IdentitySource,omitempty"`

Expand Down
5 changes: 5 additions & 0 deletions cloudformation/dax/aws-dax-cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ type Cluster struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dax-cluster.html#cfn-dax-cluster-availabilityzones
AvailabilityZones []string `json:"AvailabilityZones,omitempty"`

// ClusterEndpointEncryptionType AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dax-cluster.html#cfn-dax-cluster-clusterendpointencryptiontype
ClusterEndpointEncryptionType string `json:"ClusterEndpointEncryptionType,omitempty"`

// ClusterName AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dax-cluster.html#cfn-dax-cluster-clustername
Expand Down
10 changes: 5 additions & 5 deletions cloudformation/ec2/aws-ec2-spotfleet_blockdevicemapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ import (
)

// SpotFleet_BlockDeviceMapping AWS CloudFormation Resource (AWS::EC2::SpotFleet.BlockDeviceMapping)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetrequestconfigdata-launchspecifications-blockdevicemappings.html
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-blockdevicemapping.html
type SpotFleet_BlockDeviceMapping struct {

// DeviceName AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetrequestconfigdata-launchspecifications-blockdevicemappings.html#cfn-ec2-spotfleet-blockdevicemapping-devicename
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-blockdevicemapping.html#cfn-ec2-spotfleet-blockdevicemapping-devicename
DeviceName string `json:"DeviceName,omitempty"`

// Ebs AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetrequestconfigdata-launchspecifications-blockdevicemappings.html#cfn-ec2-spotfleet-blockdevicemapping-ebs
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-blockdevicemapping.html#cfn-ec2-spotfleet-blockdevicemapping-ebs
Ebs *SpotFleet_EbsBlockDevice `json:"Ebs,omitempty"`

// NoDevice AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetrequestconfigdata-launchspecifications-blockdevicemappings.html#cfn-ec2-spotfleet-blockdevicemapping-nodevice
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-blockdevicemapping.html#cfn-ec2-spotfleet-blockdevicemapping-nodevice
NoDevice string `json:"NoDevice,omitempty"`

// VirtualName AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetrequestconfigdata-launchspecifications-blockdevicemappings.html#cfn-ec2-spotfleet-blockdevicemapping-virtualname
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-blockdevicemapping.html#cfn-ec2-spotfleet-blockdevicemapping-virtualname
VirtualName string `json:"VirtualName,omitempty"`

// AWSCloudFormationDeletionPolicy represents a CloudFormation DeletionPolicy
Expand Down
14 changes: 7 additions & 7 deletions cloudformation/ec2/aws-ec2-spotfleet_ebsblockdevice.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,37 @@ import (
)

// SpotFleet_EbsBlockDevice AWS CloudFormation Resource (AWS::EC2::SpotFleet.EbsBlockDevice)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetrequestconfigdata-launchspecifications-blockdevicemappings-ebs.html
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-ebsblockdevice.html
type SpotFleet_EbsBlockDevice struct {

// DeleteOnTermination AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetrequestconfigdata-launchspecifications-blockdevicemappings-ebs.html#cfn-ec2-spotfleet-ebsblockdevice-deleteontermination
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-ebsblockdevice.html#cfn-ec2-spotfleet-ebsblockdevice-deleteontermination
DeleteOnTermination bool `json:"DeleteOnTermination,omitempty"`

// Encrypted AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetrequestconfigdata-launchspecifications-blockdevicemappings-ebs.html#cfn-ec2-spotfleet-ebsblockdevice-encrypted
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-ebsblockdevice.html#cfn-ec2-spotfleet-ebsblockdevice-encrypted
Encrypted bool `json:"Encrypted,omitempty"`

// Iops AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetrequestconfigdata-launchspecifications-blockdevicemappings-ebs.html#cfn-ec2-spotfleet-ebsblockdevice-iops
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-ebsblockdevice.html#cfn-ec2-spotfleet-ebsblockdevice-iops
Iops int `json:"Iops,omitempty"`

// SnapshotId AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetrequestconfigdata-launchspecifications-blockdevicemappings-ebs.html#cfn-ec2-spotfleet-ebsblockdevice-snapshotid
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-ebsblockdevice.html#cfn-ec2-spotfleet-ebsblockdevice-snapshotid
SnapshotId string `json:"SnapshotId,omitempty"`

// VolumeSize AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetrequestconfigdata-launchspecifications-blockdevicemappings-ebs.html#cfn-ec2-spotfleet-ebsblockdevice-volumesize
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-ebsblockdevice.html#cfn-ec2-spotfleet-ebsblockdevice-volumesize
VolumeSize int `json:"VolumeSize,omitempty"`

// VolumeType AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetrequestconfigdata-launchspecifications-blockdevicemappings-ebs.html#cfn-ec2-spotfleet-ebsblockdevice-volumetype
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-ebsblockdevice.html#cfn-ec2-spotfleet-ebsblockdevice-volumetype
VolumeType string `json:"VolumeType,omitempty"`

// AWSCloudFormationDeletionPolicy represents a CloudFormation DeletionPolicy
Expand Down
4 changes: 2 additions & 2 deletions cloudformation/ec2/aws-ec2-spotfleet_groupidentifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (
)

// SpotFleet_GroupIdentifier AWS CloudFormation Resource (AWS::EC2::SpotFleet.GroupIdentifier)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetrequestconfigdata-launchspecifications-securitygroups.html
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-groupidentifier.html
type SpotFleet_GroupIdentifier struct {

// GroupId AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetrequestconfigdata-launchspecifications-securitygroups.html#cfn-ec2-spotfleet-groupidentifier-groupid
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-groupidentifier.html#cfn-ec2-spotfleet-groupidentifier-groupid
GroupId string `json:"GroupId,omitempty"`

// AWSCloudFormationDeletionPolicy represents a CloudFormation DeletionPolicy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (
)

// SpotFleet_IamInstanceProfileSpecification AWS CloudFormation Resource (AWS::EC2::SpotFleet.IamInstanceProfileSpecification)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetrequestconfigdata-launchspecifications-iaminstanceprofile.html
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-iaminstanceprofilespecification.html
type SpotFleet_IamInstanceProfileSpecification struct {

// Arn AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetrequestconfigdata-launchspecifications-iaminstanceprofile.html#cfn-ec2-spotfleet-iaminstanceprofilespecification-arn
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-iaminstanceprofilespecification.html#cfn-ec2-spotfleet-iaminstanceprofilespecification-arn
Arn string `json:"Arn,omitempty"`

// AWSCloudFormationDeletionPolicy represents a CloudFormation DeletionPolicy
Expand Down
Loading

0 comments on commit 0714ecf

Please sign in to comment.