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

feat(schema): AWS CloudFormation Update (2019-03-15) #189

Merged
merged 1 commit into from
Mar 15, 2019
Merged
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
375 changes: 375 additions & 0 deletions cloudformation/all.go

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions cloudformation/resources/aws-appstream-fleet.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ type AWSAppStreamFleet struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-fleet.html#cfn-appstream-fleet-name
Name string `json:"Name,omitempty"`

// Tags AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-fleet.html#cfn-appstream-fleet-tags
Tags []Tag `json:"Tags,omitempty"`

// VpcConfig AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-fleet.html#cfn-appstream-fleet-vpcconfig
Expand Down
5 changes: 5 additions & 0 deletions cloudformation/resources/aws-appstream-imagebuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ type AWSAppStreamImageBuilder struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-imagebuilder.html#cfn-appstream-imagebuilder-name
Name string `json:"Name,omitempty"`

// Tags AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-imagebuilder.html#cfn-appstream-imagebuilder-tags
Tags []Tag `json:"Tags,omitempty"`

// VpcConfig AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-imagebuilder.html#cfn-appstream-imagebuilder-vpcconfig
Expand Down
5 changes: 5 additions & 0 deletions cloudformation/resources/aws-appstream-stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ type AWSAppStreamStack struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-stack.html#cfn-appstream-stack-storageconnectors
StorageConnectors []AWSAppStreamStack_StorageConnector `json:"StorageConnectors,omitempty"`

// Tags AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-stack.html#cfn-appstream-stack-tags
Tags []Tag `json:"Tags,omitempty"`

// UserSettings AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-stack.html#cfn-appstream-stack-usersettings
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package resources

import "github.com/awslabs/goformation/cloudformation/policies"

// AWSCodeBuildProject_GitSubmodulesConfig AWS CloudFormation Resource (AWS::CodeBuild::Project.GitSubmodulesConfig)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-gitsubmodulesconfig.html
type AWSCodeBuildProject_GitSubmodulesConfig struct {

// FetchSubmodules AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-gitsubmodulesconfig.html#cfn-codebuild-project-gitsubmodulesconfig-fetchsubmodules
FetchSubmodules bool `json:"FetchSubmodules"`

// _deletionPolicy represents a CloudFormation DeletionPolicy
_deletionPolicy policies.DeletionPolicy

// _dependsOn stores the logical ID of the resources to be created before this resource
_dependsOn []string

// _metadata stores structured data associated with this resource
_metadata map[string]interface{}
}

// AWSCloudFormationType returns the AWS CloudFormation resource type
func (r *AWSCodeBuildProject_GitSubmodulesConfig) AWSCloudFormationType() string {
return "AWS::CodeBuild::Project.GitSubmodulesConfig"
}

// DependsOn returns a slice of logical ID names this resource depends on.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html
func (r *AWSCodeBuildProject_GitSubmodulesConfig) DependsOn() []string {
return r._dependsOn
}

// SetDependsOn specify that the creation of this resource follows another.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html
func (r *AWSCodeBuildProject_GitSubmodulesConfig) SetDependsOn(dependencies []string) {
r._dependsOn = dependencies
}

// Metadata returns the metadata associated with this resource.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-metadata.html
func (r *AWSCodeBuildProject_GitSubmodulesConfig) Metadata() map[string]interface{} {
return r._metadata
}

// SetMetadata enables you to associate structured data with this resource.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-metadata.html
func (r *AWSCodeBuildProject_GitSubmodulesConfig) SetMetadata(metadata map[string]interface{}) {
r._metadata = metadata
}

// SetDeletionPolicy applies an AWS CloudFormation DeletionPolicy to this resource
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html
func (r *AWSCodeBuildProject_GitSubmodulesConfig) SetDeletionPolicy(policy policies.DeletionPolicy) {
r._deletionPolicy = policy
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ import "github.com/awslabs/goformation/cloudformation/policies"
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-s3logsconfig.html
type AWSCodeBuildProject_S3LogsConfig struct {

// EncryptionDisabled AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-s3logsconfig.html#cfn-codebuild-project-s3logsconfig-encryptiondisabled
EncryptionDisabled bool `json:"EncryptionDisabled,omitempty"`

// Location AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-s3logsconfig.html#cfn-codebuild-project-s3logsconfig-location
Expand Down
5 changes: 5 additions & 0 deletions cloudformation/resources/aws-codebuild-project_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ type AWSCodeBuildProject_Source struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-gitclonedepth
GitCloneDepth int `json:"GitCloneDepth,omitempty"`

// GitSubmodulesConfig AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-gitsubmodulesconfig
GitSubmodulesConfig *AWSCodeBuildProject_GitSubmodulesConfig `json:"GitSubmodulesConfig,omitempty"`

// InsecureSsl AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-insecuressl
Expand Down
119 changes: 119 additions & 0 deletions cloudformation/resources/aws-greengrass-connectordefinition.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
package resources

import (
"bytes"
"encoding/json"
"fmt"
"github.com/awslabs/goformation/cloudformation/policies"
)

// AWSGreengrassConnectorDefinition AWS CloudFormation Resource (AWS::Greengrass::ConnectorDefinition)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-connectordefinition.html
type AWSGreengrassConnectorDefinition struct {

// InitialVersion AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-connectordefinition.html#cfn-greengrass-connectordefinition-initialversion
InitialVersion *AWSGreengrassConnectorDefinition_ConnectorDefinitionVersion `json:"InitialVersion,omitempty"`

// Name AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-connectordefinition.html#cfn-greengrass-connectordefinition-name
Name string `json:"Name,omitempty"`

// _deletionPolicy represents a CloudFormation DeletionPolicy
_deletionPolicy policies.DeletionPolicy

// _dependsOn stores the logical ID of the resources to be created before this resource
_dependsOn []string

// _metadata stores structured data associated with this resource
_metadata map[string]interface{}
}

// AWSCloudFormationType returns the AWS CloudFormation resource type
func (r *AWSGreengrassConnectorDefinition) AWSCloudFormationType() string {
return "AWS::Greengrass::ConnectorDefinition"
}

// DependsOn returns a slice of logical ID names this resource depends on.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html
func (r *AWSGreengrassConnectorDefinition) DependsOn() []string {
return r._dependsOn
}

// SetDependsOn specify that the creation of this resource follows another.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html
func (r *AWSGreengrassConnectorDefinition) SetDependsOn(dependencies []string) {
r._dependsOn = dependencies
}

// Metadata returns the metadata associated with this resource.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-metadata.html
func (r *AWSGreengrassConnectorDefinition) Metadata() map[string]interface{} {
return r._metadata
}

// SetMetadata enables you to associate structured data with this resource.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-metadata.html
func (r *AWSGreengrassConnectorDefinition) SetMetadata(metadata map[string]interface{}) {
r._metadata = metadata
}

// SetDeletionPolicy applies an AWS CloudFormation DeletionPolicy to this resource
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html
func (r *AWSGreengrassConnectorDefinition) SetDeletionPolicy(policy policies.DeletionPolicy) {
r._deletionPolicy = policy
}

// MarshalJSON is a custom JSON marshalling hook that embeds this object into
// an AWS CloudFormation JSON resource's 'Properties' field and adds a 'Type'.
func (r AWSGreengrassConnectorDefinition) MarshalJSON() ([]byte, error) {
type Properties AWSGreengrassConnectorDefinition
return json.Marshal(&struct {
Type string
Properties Properties
DependsOn []string `json:"DependsOn,omitempty"`
Metadata map[string]interface{} `json:"Metadata,omitempty"`
DeletionPolicy policies.DeletionPolicy `json:"DeletionPolicy,omitempty"`
}{
Type: r.AWSCloudFormationType(),
Properties: (Properties)(r),
DependsOn: r._dependsOn,
Metadata: r._metadata,
DeletionPolicy: r._deletionPolicy,
})
}

// UnmarshalJSON is a custom JSON unmarshalling hook that strips the outer
// AWS CloudFormation resource object, and just keeps the 'Properties' field.
func (r *AWSGreengrassConnectorDefinition) UnmarshalJSON(b []byte) error {
type Properties AWSGreengrassConnectorDefinition
res := &struct {
Type string
Properties *Properties
DependsOn []string
Metadata map[string]interface{}
}{}

dec := json.NewDecoder(bytes.NewReader(b))
dec.DisallowUnknownFields() // Force error if unknown field is found

if err := dec.Decode(&res); err != nil {
fmt.Printf("ERROR: %s\n", err)
return err
}

// If the resource has no Properties set, it could be nil
if res.Properties != nil {
*r = AWSGreengrassConnectorDefinition(*res.Properties)
}
if res.DependsOn != nil {
r._dependsOn = res.DependsOn
}
if res.Metadata != nil {
r._metadata = res.Metadata
}

return nil
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
package resources

import "github.com/awslabs/goformation/cloudformation/policies"

// AWSGreengrassConnectorDefinition_Connector AWS CloudFormation Resource (AWS::Greengrass::ConnectorDefinition.Connector)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-connectordefinition-connector.html
type AWSGreengrassConnectorDefinition_Connector struct {

// ConnectorArn AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-connectordefinition-connector.html#cfn-greengrass-connectordefinition-connector-connectorarn
ConnectorArn string `json:"ConnectorArn,omitempty"`

// Id AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-connectordefinition-connector.html#cfn-greengrass-connectordefinition-connector-id
Id string `json:"Id,omitempty"`

// Parameters AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-connectordefinition-connector.html#cfn-greengrass-connectordefinition-connector-parameters
Parameters interface{} `json:"Parameters,omitempty"`

// _deletionPolicy represents a CloudFormation DeletionPolicy
_deletionPolicy policies.DeletionPolicy

// _dependsOn stores the logical ID of the resources to be created before this resource
_dependsOn []string

// _metadata stores structured data associated with this resource
_metadata map[string]interface{}
}

// AWSCloudFormationType returns the AWS CloudFormation resource type
func (r *AWSGreengrassConnectorDefinition_Connector) AWSCloudFormationType() string {
return "AWS::Greengrass::ConnectorDefinition.Connector"
}

// DependsOn returns a slice of logical ID names this resource depends on.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html
func (r *AWSGreengrassConnectorDefinition_Connector) DependsOn() []string {
return r._dependsOn
}

// SetDependsOn specify that the creation of this resource follows another.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html
func (r *AWSGreengrassConnectorDefinition_Connector) SetDependsOn(dependencies []string) {
r._dependsOn = dependencies
}

// Metadata returns the metadata associated with this resource.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-metadata.html
func (r *AWSGreengrassConnectorDefinition_Connector) Metadata() map[string]interface{} {
return r._metadata
}

// SetMetadata enables you to associate structured data with this resource.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-metadata.html
func (r *AWSGreengrassConnectorDefinition_Connector) SetMetadata(metadata map[string]interface{}) {
r._metadata = metadata
}

// SetDeletionPolicy applies an AWS CloudFormation DeletionPolicy to this resource
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html
func (r *AWSGreengrassConnectorDefinition_Connector) SetDeletionPolicy(policy policies.DeletionPolicy) {
r._deletionPolicy = policy
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package resources

import "github.com/awslabs/goformation/cloudformation/policies"

// AWSGreengrassConnectorDefinition_ConnectorDefinitionVersion AWS CloudFormation Resource (AWS::Greengrass::ConnectorDefinition.ConnectorDefinitionVersion)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-connectordefinition-connectordefinitionversion.html
type AWSGreengrassConnectorDefinition_ConnectorDefinitionVersion struct {

// Connectors AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-connectordefinition-connectordefinitionversion.html#cfn-greengrass-connectordefinition-connectordefinitionversion-connectors
Connectors []AWSGreengrassConnectorDefinition_Connector `json:"Connectors,omitempty"`

// _deletionPolicy represents a CloudFormation DeletionPolicy
_deletionPolicy policies.DeletionPolicy

// _dependsOn stores the logical ID of the resources to be created before this resource
_dependsOn []string

// _metadata stores structured data associated with this resource
_metadata map[string]interface{}
}

// AWSCloudFormationType returns the AWS CloudFormation resource type
func (r *AWSGreengrassConnectorDefinition_ConnectorDefinitionVersion) AWSCloudFormationType() string {
return "AWS::Greengrass::ConnectorDefinition.ConnectorDefinitionVersion"
}

// DependsOn returns a slice of logical ID names this resource depends on.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html
func (r *AWSGreengrassConnectorDefinition_ConnectorDefinitionVersion) DependsOn() []string {
return r._dependsOn
}

// SetDependsOn specify that the creation of this resource follows another.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html
func (r *AWSGreengrassConnectorDefinition_ConnectorDefinitionVersion) SetDependsOn(dependencies []string) {
r._dependsOn = dependencies
}

// Metadata returns the metadata associated with this resource.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-metadata.html
func (r *AWSGreengrassConnectorDefinition_ConnectorDefinitionVersion) Metadata() map[string]interface{} {
return r._metadata
}

// SetMetadata enables you to associate structured data with this resource.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-metadata.html
func (r *AWSGreengrassConnectorDefinition_ConnectorDefinitionVersion) SetMetadata(metadata map[string]interface{}) {
r._metadata = metadata
}

// SetDeletionPolicy applies an AWS CloudFormation DeletionPolicy to this resource
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html
func (r *AWSGreengrassConnectorDefinition_ConnectorDefinitionVersion) SetDeletionPolicy(policy policies.DeletionPolicy) {
r._deletionPolicy = policy
}
Loading