Skip to content

Commit

Permalink
fix(schema): CloudFormation Updates (awslabs#330)
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 Nov 1, 2020
1 parent b62802c commit 4070319
Show file tree
Hide file tree
Showing 37 changed files with 5,191 additions and 709 deletions.
152 changes: 152 additions & 0 deletions cloudformation/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ import (
"github.com/awslabs/goformation/v4/cloudformation/iot1click"
"github.com/awslabs/goformation/v4/cloudformation/iotanalytics"
"github.com/awslabs/goformation/v4/cloudformation/iotevents"
"github.com/awslabs/goformation/v4/cloudformation/iotsitewise"
"github.com/awslabs/goformation/v4/cloudformation/iotthingsgraph"
"github.com/awslabs/goformation/v4/cloudformation/ivs"
"github.com/awslabs/goformation/v4/cloudformation/kendra"
"github.com/awslabs/goformation/v4/cloudformation/kinesis"
"github.com/awslabs/goformation/v4/cloudformation/kinesisanalytics"
Expand Down Expand Up @@ -470,6 +472,9 @@ func AllResources() map[string]Resource {
"AWS::IAM::ServiceLinkedRole": &iam.ServiceLinkedRole{},
"AWS::IAM::User": &iam.User{},
"AWS::IAM::UserToGroupAddition": &iam.UserToGroupAddition{},
"AWS::IVS::Channel": &ivs.Channel{},
"AWS::IVS::PlaybackKeyPair": &ivs.PlaybackKeyPair{},
"AWS::IVS::StreamKey": &ivs.StreamKey{},
"AWS::ImageBuilder::Component": &imagebuilder.Component{},
"AWS::ImageBuilder::DistributionConfiguration": &imagebuilder.DistributionConfiguration{},
"AWS::ImageBuilder::Image": &imagebuilder.Image{},
Expand All @@ -496,6 +501,9 @@ func AllResources() map[string]Resource {
"AWS::IoTAnalytics::Pipeline": &iotanalytics.Pipeline{},
"AWS::IoTEvents::DetectorModel": &iotevents.DetectorModel{},
"AWS::IoTEvents::Input": &iotevents.Input{},
"AWS::IoTSiteWise::Asset": &iotsitewise.Asset{},
"AWS::IoTSiteWise::AssetModel": &iotsitewise.AssetModel{},
"AWS::IoTSiteWise::Gateway": &iotsitewise.Gateway{},
"AWS::IoTThingsGraph::FlowTemplate": &iotthingsgraph.FlowTemplate{},
"AWS::KMS::Alias": &kms.Alias{},
"AWS::KMS::Key": &kms.Key{},
Expand Down Expand Up @@ -8762,6 +8770,78 @@ func (t *Template) GetIAMUserToGroupAdditionWithName(name string) (*iam.UserToGr
return nil, fmt.Errorf("resource %q of type iam.UserToGroupAddition not found", name)
}

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

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

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

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

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

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

// GetAllImageBuilderComponentResources retrieves all imagebuilder.Component items from an AWS CloudFormation template
func (t *Template) GetAllImageBuilderComponentResources() map[string]*imagebuilder.Component {
results := map[string]*imagebuilder.Component{}
Expand Down Expand Up @@ -9386,6 +9466,78 @@ func (t *Template) GetIoTEventsInputWithName(name string) (*iotevents.Input, err
return nil, fmt.Errorf("resource %q of type iotevents.Input not found", name)
}

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

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

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

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

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

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

// GetAllIoTThingsGraphFlowTemplateResources retrieves all iotthingsgraph.FlowTemplate items from an AWS CloudFormation template
func (t *Template) GetAllIoTThingsGraphFlowTemplateResources() map[string]*iotthingsgraph.FlowTemplate {
results := map[string]*iotthingsgraph.FlowTemplate{}
Expand Down
5 changes: 5 additions & 0 deletions cloudformation/dlm/aws-dlm-lifecyclepolicy_parameters.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ type LifecyclePolicy_Parameters struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-parameters.html#cfn-dlm-lifecyclepolicy-parameters-excludebootvolume
ExcludeBootVolume bool `json:"ExcludeBootVolume,omitempty"`

// NoReboot AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-parameters.html#cfn-dlm-lifecyclepolicy-parameters-noreboot
NoReboot bool `json:"NoReboot,omitempty"`

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

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

// SelfServicePortal AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-clientvpnendpoint.html#cfn-ec2-clientvpnendpoint-selfserviceportal
SelfServicePortal string `json:"SelfServicePortal,omitempty"`

// ServerCertificateArn AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-clientvpnendpoint.html#cfn-ec2-clientvpnendpoint-servercertificatearn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ type ClientVpnEndpoint_FederatedAuthenticationRequest struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-clientvpnendpoint-federatedauthenticationrequest.html#cfn-ec2-clientvpnendpoint-federatedauthenticationrequest-samlproviderarn
SAMLProviderArn string `json:"SAMLProviderArn,omitempty"`

// SelfServiceSAMLProviderArn AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-clientvpnendpoint-federatedauthenticationrequest.html#cfn-ec2-clientvpnendpoint-federatedauthenticationrequest-selfservicesamlproviderarn
SelfServiceSAMLProviderArn string `json:"SelfServiceSAMLProviderArn,omitempty"`

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

Expand Down
5 changes: 0 additions & 5 deletions cloudformation/ec2/aws-ec2-vpcendpointservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ type VPCEndpointService struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpointservice.html#cfn-ec2-vpcendpointservice-acceptancerequired
AcceptanceRequired bool `json:"AcceptanceRequired,omitempty"`

// ApplianceLoadBalancerArns AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpointservice.html#cfn-ec2-vpcendpointservice-applianceloadbalancerarns
ApplianceLoadBalancerArns []string `json:"ApplianceLoadBalancerArns,omitempty"`

// NetworkLoadBalancerArns AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpointservice.html#cfn-ec2-vpcendpointservice-networkloadbalancerarns
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ type EndpointGroup struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-endpointgroup.html#cfn-globalaccelerator-endpointgroup-listenerarn
ListenerArn string `json:"ListenerArn,omitempty"`

// PortOverrides AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-endpointgroup.html#cfn-globalaccelerator-endpointgroup-portoverrides
PortOverrides []EndpointGroup_PortOverride `json:"PortOverrides,omitempty"`

// ThresholdCount AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-endpointgroup.html#cfn-globalaccelerator-endpointgroup-thresholdcount
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package globalaccelerator

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

// EndpointGroup_PortOverride AWS CloudFormation Resource (AWS::GlobalAccelerator::EndpointGroup.PortOverride)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-endpointgroup-portoverride.html
type EndpointGroup_PortOverride struct {

// EndpointPort AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-endpointgroup-portoverride.html#cfn-globalaccelerator-endpointgroup-portoverride-endpointport
EndpointPort int `json:"EndpointPort"`

// ListenerPort AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-endpointgroup-portoverride.html#cfn-globalaccelerator-endpointgroup-portoverride-listenerport
ListenerPort int `json:"ListenerPort"`

// 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 *EndpointGroup_PortOverride) AWSCloudFormationType() string {
return "AWS::GlobalAccelerator::EndpointGroup.PortOverride"
}
Loading

0 comments on commit 4070319

Please sign in to comment.