Skip to content

Commit

Permalink
fix(schema): CloudFormation Updates (awslabs#400)
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 Sep 3, 2021
1 parent 53470cb commit 1606bbe
Show file tree
Hide file tree
Showing 47 changed files with 3,359 additions and 159 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package acmpca

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

// CertificateAuthority_OcspConfiguration AWS CloudFormation Resource (AWS::ACMPCA::CertificateAuthority.OcspConfiguration)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificateauthority-ocspconfiguration.html
type CertificateAuthority_OcspConfiguration struct {

// Enabled AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificateauthority-ocspconfiguration.html#cfn-acmpca-certificateauthority-ocspconfiguration-enabled
Enabled bool `json:"Enabled,omitempty"`

// OcspCustomCname AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificateauthority-ocspconfiguration.html#cfn-acmpca-certificateauthority-ocspconfiguration-ocspcustomcname
OcspCustomCname string `json:"OcspCustomCname,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 *CertificateAuthority_OcspConfiguration) AWSCloudFormationType() string {
return "AWS::ACMPCA::CertificateAuthority.OcspConfiguration"
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ type CertificateAuthority_RevocationConfiguration struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificateauthority-revocationconfiguration.html#cfn-acmpca-certificateauthority-revocationconfiguration-crlconfiguration
CrlConfiguration *CertificateAuthority_CrlConfiguration `json:"CrlConfiguration,omitempty"`

// OcspConfiguration AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificateauthority-revocationconfiguration.html#cfn-acmpca-certificateauthority-revocationconfiguration-ocspconfiguration
OcspConfiguration *CertificateAuthority_OcspConfiguration `json:"OcspConfiguration,omitempty"`

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

Expand Down
75 changes: 75 additions & 0 deletions cloudformation/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,7 @@ func AllResources() map[string]Resource {
"AWS::IoT::CustomMetric": &iot.CustomMetric{},
"AWS::IoT::Dimension": &iot.Dimension{},
"AWS::IoT::DomainConfiguration": &iot.DomainConfiguration{},
"AWS::IoT::FleetMetric": &iot.FleetMetric{},
"AWS::IoT::MitigationAction": &iot.MitigationAction{},
"AWS::IoT::Policy": &iot.Policy{},
"AWS::IoT::PolicyPrincipalAttachment": &iot.PolicyPrincipalAttachment{},
Expand Down Expand Up @@ -833,6 +834,8 @@ func AllResources() map[string]Resource {
"AWS::S3::AccessPoint": &s3.AccessPoint{},
"AWS::S3::Bucket": &s3.Bucket{},
"AWS::S3::BucketPolicy": &s3.BucketPolicy{},
"AWS::S3::MultiRegionAccessPoint": &s3.MultiRegionAccessPoint{},
"AWS::S3::MultiRegionAccessPointPolicy": &s3.MultiRegionAccessPointPolicy{},
"AWS::S3::StorageLens": &s3.StorageLens{},
"AWS::S3ObjectLambda::AccessPoint": &s3objectlambda.AccessPoint{},
"AWS::S3ObjectLambda::AccessPointPolicy": &s3objectlambda.AccessPointPolicy{},
Expand Down Expand Up @@ -11606,6 +11609,30 @@ func (t *Template) GetIoTDomainConfigurationWithName(name string) (*iot.DomainCo
return nil, fmt.Errorf("resource %q of type iot.DomainConfiguration not found", name)
}

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

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

// GetAllIoTMitigationActionResources retrieves all iot.MitigationAction items from an AWS CloudFormation template
func (t *Template) GetAllIoTMitigationActionResources() map[string]*iot.MitigationAction {
results := map[string]*iot.MitigationAction{}
Expand Down Expand Up @@ -16742,6 +16769,54 @@ func (t *Template) GetS3BucketPolicyWithName(name string) (*s3.BucketPolicy, err
return nil, fmt.Errorf("resource %q of type s3.BucketPolicy not found", name)
}

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

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

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

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

// GetAllS3StorageLensResources retrieves all s3.StorageLens items from an AWS CloudFormation template
func (t *Template) GetAllS3StorageLensResources() map[string]*s3.StorageLens {
results := map[string]*s3.StorageLens{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ type Flow_ScheduledTriggerProperties struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-flow-scheduledtriggerproperties.html#cfn-appflow-flow-scheduledtriggerproperties-scheduleexpression
ScheduleExpression string `json:"ScheduleExpression,omitempty"`

// ScheduleOffset AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-flow-scheduledtriggerproperties.html#cfn-appflow-flow-scheduledtriggerproperties-scheduleoffset
ScheduleOffset float64 `json:"ScheduleOffset,omitempty"`

// ScheduleStartTime AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-flow-scheduledtriggerproperties.html#cfn-appflow-flow-scheduledtriggerproperties-schedulestarttime
Expand Down
20 changes: 20 additions & 0 deletions cloudformation/appflow/aws-appflow-flow_veevasourceproperties.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,26 @@ import (
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-flow-veevasourceproperties.html
type Flow_VeevaSourceProperties struct {

// DocumentType AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-flow-veevasourceproperties.html#cfn-appflow-flow-veevasourceproperties-documenttype
DocumentType string `json:"DocumentType,omitempty"`

// IncludeAllVersions AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-flow-veevasourceproperties.html#cfn-appflow-flow-veevasourceproperties-includeallversions
IncludeAllVersions bool `json:"IncludeAllVersions,omitempty"`

// IncludeRenditions AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-flow-veevasourceproperties.html#cfn-appflow-flow-veevasourceproperties-includerenditions
IncludeRenditions bool `json:"IncludeRenditions,omitempty"`

// IncludeSourceFiles AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-flow-veevasourceproperties.html#cfn-appflow-flow-veevasourceproperties-includesourcefiles
IncludeSourceFiles bool `json:"IncludeSourceFiles,omitempty"`

// Object AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-flow-veevasourceproperties.html#cfn-appflow-flow-veevasourceproperties-object
Expand Down
10 changes: 10 additions & 0 deletions cloudformation/cloudtrail/aws-cloudtrail-trail.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ type Trail struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudtrail-trail.html#cfn-cloudtrail-trail-includeglobalserviceevents
IncludeGlobalServiceEvents bool `json:"IncludeGlobalServiceEvents,omitempty"`

// InsightSelectors AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudtrail-trail.html#cfn-cloudtrail-trail-insightselectors
InsightSelectors []Trail_InsightSelector `json:"InsightSelectors,omitempty"`

// IsLogging AWS CloudFormation Property
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudtrail-trail.html#cfn-cloudtrail-trail-islogging
Expand All @@ -48,6 +53,11 @@ type Trail struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudtrail-trail.html#cfn-cloudtrail-trail-ismultiregiontrail
IsMultiRegionTrail bool `json:"IsMultiRegionTrail,omitempty"`

// IsOrganizationTrail AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudtrail-trail.html#cfn-cloudtrail-trail-isorganizationtrail
IsOrganizationTrail bool `json:"IsOrganizationTrail,omitempty"`

// KMSKeyId AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudtrail-trail.html#cfn-cloudtrail-trail-kmskeyid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ type Trail_EventSelector struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-trail-eventselector.html#cfn-cloudtrail-trail-eventselector-dataresources
DataResources []Trail_DataResource `json:"DataResources,omitempty"`

// ExcludeManagementEventSources AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-trail-eventselector.html#cfn-cloudtrail-trail-eventselector-excludemanagementeventsources
ExcludeManagementEventSources []string `json:"ExcludeManagementEventSources,omitempty"`

// IncludeManagementEvents AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-trail-eventselector.html#cfn-cloudtrail-trail-eventselector-includemanagementevents
Expand Down
35 changes: 35 additions & 0 deletions cloudformation/cloudtrail/aws-cloudtrail-trail_insightselector.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package cloudtrail

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

// Trail_InsightSelector AWS CloudFormation Resource (AWS::CloudTrail::Trail.InsightSelector)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-trail-insightselector.html
type Trail_InsightSelector struct {

// InsightType AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-trail-insightselector.html#cfn-cloudtrail-trail-insightselector-insighttype
InsightType string `json:"InsightType,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 *Trail_InsightSelector) AWSCloudFormationType() string {
return "AWS::CloudTrail::Trail.InsightSelector"
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (
type NotificationRule_Target struct {

// TargetAddress AWS CloudFormation Property
// Required: false
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codestarnotifications-notificationrule-target.html#cfn-codestarnotifications-notificationrule-target-targetaddress
TargetAddress string `json:"TargetAddress,omitempty"`

// TargetType AWS CloudFormation Property
// Required: false
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codestarnotifications-notificationrule-target.html#cfn-codestarnotifications-notificationrule-target-targettype
TargetType string `json:"TargetType,omitempty"`

Expand Down
5 changes: 5 additions & 0 deletions cloudformation/datasync/aws-datasync-task.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ type Task struct {
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-task.html#cfn-datasync-task-excludes
Excludes []Task_FilterRule `json:"Excludes,omitempty"`

// Includes AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-task.html#cfn-datasync-task-includes
Includes []Task_FilterRule `json:"Includes,omitempty"`

// Name AWS CloudFormation Property
// Required: false
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-task.html#cfn-datasync-task-name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
type CacheCluster_CloudWatchLogsDestinationDetails struct {

// LogGroup AWS CloudFormation Property
// Required: false
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-cachecluster-cloudwatchlogsdestinationdetails.html#cfn-elasticache-cachecluster-cloudwatchlogsdestinationdetails-loggroup
LogGroup string `json:"LogGroup,omitempty"`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
type CacheCluster_KinesisFirehoseDestinationDetails struct {

// DeliveryStream AWS CloudFormation Property
// Required: false
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-cachecluster-kinesisfirehosedestinationdetails.html#cfn-elasticache-cachecluster-kinesisfirehosedestinationdetails-deliverystream
DeliveryStream string `json:"DeliveryStream,omitempty"`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ import (
type CacheCluster_LogDeliveryConfigurationRequest struct {

// DestinationDetails AWS CloudFormation Property
// Required: false
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-cachecluster-logdeliveryconfigurationrequest.html#cfn-elasticache-cachecluster-logdeliveryconfigurationrequest-destinationdetails
DestinationDetails *CacheCluster_DestinationDetails `json:"DestinationDetails,omitempty"`

// DestinationType AWS CloudFormation Property
// Required: false
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-cachecluster-logdeliveryconfigurationrequest.html#cfn-elasticache-cachecluster-logdeliveryconfigurationrequest-destinationtype
DestinationType string `json:"DestinationType,omitempty"`

// LogFormat AWS CloudFormation Property
// Required: false
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-cachecluster-logdeliveryconfigurationrequest.html#cfn-elasticache-cachecluster-logdeliveryconfigurationrequest-logformat
LogFormat string `json:"LogFormat,omitempty"`

// LogType AWS CloudFormation Property
// Required: false
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-cachecluster-logdeliveryconfigurationrequest.html#cfn-elasticache-cachecluster-logdeliveryconfigurationrequest-logtype
LogType string `json:"LogType,omitempty"`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
type ReplicationGroup_CloudWatchLogsDestinationDetails struct {

// LogGroup AWS CloudFormation Property
// Required: false
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-replicationgroup-cloudwatchlogsdestinationdetails.html#cfn-elasticache-replicationgroup-cloudwatchlogsdestinationdetails-loggroup
LogGroup string `json:"LogGroup,omitempty"`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
type ReplicationGroup_KinesisFirehoseDestinationDetails struct {

// DeliveryStream AWS CloudFormation Property
// Required: false
// Required: true
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-replicationgroup-kinesisfirehosedestinationdetails.html#cfn-elasticache-replicationgroup-kinesisfirehosedestinationdetails-deliverystream
DeliveryStream string `json:"DeliveryStream,omitempty"`

Expand Down
Loading

0 comments on commit 1606bbe

Please sign in to comment.