forked from awslabs/goformation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(schema): AWS CloudFormation Update (2019-10-26) (awslabs#231)
- Loading branch information
1 parent
8bd90f2
commit 63ca311
Showing
13 changed files
with
748 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
cloudformation/resources/aws-ec2-trafficmirrorfilterrule_trafficmirrorportrange.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
package resources | ||
|
||
import "github.com/awslabs/goformation/cloudformation/policies" | ||
|
||
// AWSEC2TrafficMirrorFilterRule_TrafficMirrorPortRange AWS CloudFormation Resource (AWS::EC2::TrafficMirrorFilterRule.TrafficMirrorPortRange) | ||
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-trafficmirrorfilterrule-trafficmirrorportrange.html | ||
type AWSEC2TrafficMirrorFilterRule_TrafficMirrorPortRange struct { | ||
|
||
// FromPort AWS CloudFormation Property | ||
// Required: true | ||
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-trafficmirrorfilterrule-trafficmirrorportrange.html#cfn-ec2-trafficmirrorfilterrule-trafficmirrorportrange-fromport | ||
FromPort int `json:"FromPort"` | ||
|
||
// ToPort AWS CloudFormation Property | ||
// Required: true | ||
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-trafficmirrorfilterrule-trafficmirrorportrange.html#cfn-ec2-trafficmirrorfilterrule-trafficmirrorportrange-toport | ||
ToPort int `json:"ToPort"` | ||
|
||
// _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 *AWSEC2TrafficMirrorFilterRule_TrafficMirrorPortRange) AWSCloudFormationType() string { | ||
return "AWS::EC2::TrafficMirrorFilterRule.TrafficMirrorPortRange" | ||
} | ||
|
||
// 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 *AWSEC2TrafficMirrorFilterRule_TrafficMirrorPortRange) 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 *AWSEC2TrafficMirrorFilterRule_TrafficMirrorPortRange) 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 *AWSEC2TrafficMirrorFilterRule_TrafficMirrorPortRange) 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 *AWSEC2TrafficMirrorFilterRule_TrafficMirrorPortRange) SetMetadata(metadata map[string]interface{}) { | ||
r._metadata = metadata | ||
} | ||
|
||
// DeletionPolicy returns the AWS CloudFormation DeletionPolicy to this resource | ||
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html | ||
func (r *AWSEC2TrafficMirrorFilterRule_TrafficMirrorPortRange) DeletionPolicy() policies.DeletionPolicy { | ||
return r._deletionPolicy | ||
} | ||
|
||
// SetDeletionPolicy applies an AWS CloudFormation DeletionPolicy to this resource | ||
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html | ||
func (r *AWSEC2TrafficMirrorFilterRule_TrafficMirrorPortRange) SetDeletionPolicy(policy policies.DeletionPolicy) { | ||
r._deletionPolicy = policy | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
package resources | ||
|
||
import ( | ||
"bytes" | ||
"encoding/json" | ||
"fmt" | ||
"github.com/awslabs/goformation/cloudformation/policies" | ||
) | ||
|
||
// AWSEventsEventBus AWS CloudFormation Resource (AWS::Events::EventBus) | ||
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbus.html | ||
type AWSEventsEventBus struct { | ||
|
||
// EventSourceName AWS CloudFormation Property | ||
// Required: false | ||
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbus.html#cfn-events-eventbus-eventsourcename | ||
EventSourceName string `json:"EventSourceName,omitempty"` | ||
|
||
// Name AWS CloudFormation Property | ||
// Required: true | ||
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbus.html#cfn-events-eventbus-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 *AWSEventsEventBus) AWSCloudFormationType() string { | ||
return "AWS::Events::EventBus" | ||
} | ||
|
||
// 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 *AWSEventsEventBus) 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 *AWSEventsEventBus) 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 *AWSEventsEventBus) 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 *AWSEventsEventBus) SetMetadata(metadata map[string]interface{}) { | ||
r._metadata = metadata | ||
} | ||
|
||
// DeletionPolicy returns the AWS CloudFormation DeletionPolicy to this resource | ||
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html | ||
func (r *AWSEventsEventBus) DeletionPolicy() policies.DeletionPolicy { | ||
return r._deletionPolicy | ||
} | ||
|
||
// SetDeletionPolicy applies an AWS CloudFormation DeletionPolicy to this resource | ||
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html | ||
func (r *AWSEventsEventBus) 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 AWSEventsEventBus) MarshalJSON() ([]byte, error) { | ||
type Properties AWSEventsEventBus | ||
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 *AWSEventsEventBus) UnmarshalJSON(b []byte) error { | ||
type Properties AWSEventsEventBus | ||
res := &struct { | ||
Type string | ||
Properties *Properties | ||
DependsOn []string | ||
Metadata map[string]interface{} | ||
DeletionPolicy string | ||
}{} | ||
|
||
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 = AWSEventsEventBus(*res.Properties) | ||
} | ||
if res.DependsOn != nil { | ||
r._dependsOn = res.DependsOn | ||
} | ||
if res.Metadata != nil { | ||
r._metadata = res.Metadata | ||
} | ||
if res.DeletionPolicy != "" { | ||
r._deletionPolicy = policies.DeletionPolicy(res.DeletionPolicy) | ||
} | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
cloudformation/resources/aws-fsx-filesystem_selfmanagedactivedirectoryconfiguration.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
package resources | ||
|
||
import "github.com/awslabs/goformation/cloudformation/policies" | ||
|
||
// AWSFSxFileSystem_SelfManagedActiveDirectoryConfiguration AWS CloudFormation Resource (AWS::FSx::FileSystem.SelfManagedActiveDirectoryConfiguration) | ||
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration.html | ||
type AWSFSxFileSystem_SelfManagedActiveDirectoryConfiguration struct { | ||
|
||
// DnsIps AWS CloudFormation Property | ||
// Required: false | ||
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration.html#cfn-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration-dnsips | ||
DnsIps []string `json:"DnsIps,omitempty"` | ||
|
||
// DomainName AWS CloudFormation Property | ||
// Required: false | ||
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration.html#cfn-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration-domainname | ||
DomainName string `json:"DomainName,omitempty"` | ||
|
||
// FileSystemAdministratorsGroup AWS CloudFormation Property | ||
// Required: false | ||
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration.html#cfn-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration-filesystemadministratorsgroup | ||
FileSystemAdministratorsGroup string `json:"FileSystemAdministratorsGroup,omitempty"` | ||
|
||
// OrganizationalUnitDistinguishedName AWS CloudFormation Property | ||
// Required: false | ||
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration.html#cfn-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration-organizationalunitdistinguishedname | ||
OrganizationalUnitDistinguishedName string `json:"OrganizationalUnitDistinguishedName,omitempty"` | ||
|
||
// Password AWS CloudFormation Property | ||
// Required: false | ||
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration.html#cfn-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration-password | ||
Password string `json:"Password,omitempty"` | ||
|
||
// UserName AWS CloudFormation Property | ||
// Required: false | ||
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration.html#cfn-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration-username | ||
UserName string `json:"UserName,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 *AWSFSxFileSystem_SelfManagedActiveDirectoryConfiguration) AWSCloudFormationType() string { | ||
return "AWS::FSx::FileSystem.SelfManagedActiveDirectoryConfiguration" | ||
} | ||
|
||
// 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 *AWSFSxFileSystem_SelfManagedActiveDirectoryConfiguration) 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 *AWSFSxFileSystem_SelfManagedActiveDirectoryConfiguration) 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 *AWSFSxFileSystem_SelfManagedActiveDirectoryConfiguration) 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 *AWSFSxFileSystem_SelfManagedActiveDirectoryConfiguration) SetMetadata(metadata map[string]interface{}) { | ||
r._metadata = metadata | ||
} | ||
|
||
// DeletionPolicy returns the AWS CloudFormation DeletionPolicy to this resource | ||
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html | ||
func (r *AWSFSxFileSystem_SelfManagedActiveDirectoryConfiguration) DeletionPolicy() policies.DeletionPolicy { | ||
return r._deletionPolicy | ||
} | ||
|
||
// SetDeletionPolicy applies an AWS CloudFormation DeletionPolicy to this resource | ||
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html | ||
func (r *AWSFSxFileSystem_SelfManagedActiveDirectoryConfiguration) SetDeletionPolicy(policy policies.DeletionPolicy) { | ||
r._deletionPolicy = policy | ||
} |
Oops, something went wrong.