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): Add AWS::Serverless::Function.Auth (awslabs#373)
* function api auth * resource policy * add tests Co-authored-by: stephen.raymond <[email protected]>
- Loading branch information
1 parent
9b8c84c
commit fc2877f
Showing
7 changed files
with
493 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package serverless | ||
|
||
import ( | ||
"github.com/awslabs/goformation/v4/cloudformation/policies" | ||
) | ||
|
||
// Function_Auth AWS CloudFormation Resource (AWS::Serverless::Function.Auth) | ||
// See: https://github.com/aws/serverless-application-model/blob/master/versions/2016-10-31.md#function-auth-object | ||
type Function_Auth struct { | ||
|
||
// ApiKeyRequired AWS CloudFormation Property | ||
// Required: false | ||
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#function-auth-object | ||
ApiKeyRequired bool `json:"ApiKeyRequired,omitempty"` | ||
|
||
// AuthorizationScopes AWS CloudFormation Property | ||
// Required: false | ||
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#function-auth-object | ||
AuthorizationScopes []string `json:"AuthorizationScopes,omitempty"` | ||
|
||
// Authorizer AWS CloudFormation Property | ||
// Required: false | ||
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#function-auth-object | ||
Authorizer string `json:"Authorizer,omitempty"` | ||
|
||
// ResourcePolicy AWS CloudFormation Property | ||
// Required: false | ||
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#function-auth-object | ||
ResourcePolicy *Function_AuthResourcePolicy `json:"ResourcePolicy,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 *Function_Auth) AWSCloudFormationType() string { | ||
return "AWS::Serverless::Function.Auth" | ||
} |
85 changes: 85 additions & 0 deletions
85
cloudformation/serverless/aws-serverless-function_authresourcepolicy.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,85 @@ | ||
package serverless | ||
|
||
import ( | ||
"github.com/awslabs/goformation/v4/cloudformation/policies" | ||
) | ||
|
||
// Function_AuthResourcePolicy AWS CloudFormation Resource (AWS::Serverless::Function.AuthResourcePolicy) | ||
// See: https://github.com/aws/serverless-application-model/blob/master/versions/2016-10-31.md#function-auth-object | ||
type Function_AuthResourcePolicy struct { | ||
|
||
// AwsAccountBlacklist AWS CloudFormation Property | ||
// Required: false | ||
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#function-auth-object | ||
AwsAccountBlacklist []string `json:"AwsAccountBlacklist,omitempty"` | ||
|
||
// AwsAccountWhitelist AWS CloudFormation Property | ||
// Required: false | ||
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#function-auth-object | ||
AwsAccountWhitelist []string `json:"AwsAccountWhitelist,omitempty"` | ||
|
||
// CustomStatements AWS CloudFormation Property | ||
// Required: false | ||
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#function-auth-object | ||
CustomStatements []interface{} `json:"CustomStatements,omitempty"` | ||
|
||
// IntrinsicVpcBlacklist AWS CloudFormation Property | ||
// Required: false | ||
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#function-auth-object | ||
IntrinsicVpcBlacklist []string `json:"IntrinsicVpcBlacklist,omitempty"` | ||
|
||
// IntrinsicVpcWhitelist AWS CloudFormation Property | ||
// Required: false | ||
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#function-auth-object | ||
IntrinsicVpcWhitelist []string `json:"IntrinsicVpcWhitelist,omitempty"` | ||
|
||
// IntrinsicVpceBlacklist AWS CloudFormation Property | ||
// Required: false | ||
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#function-auth-object | ||
IntrinsicVpceBlacklist []string `json:"IntrinsicVpceBlacklist,omitempty"` | ||
|
||
// IntrinsicVpceWhitelist AWS CloudFormation Property | ||
// Required: false | ||
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#function-auth-object | ||
IntrinsicVpceWhitelist []string `json:"IntrinsicVpceWhitelist,omitempty"` | ||
|
||
// IpRangeBlacklist AWS CloudFormation Property | ||
// Required: false | ||
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#function-auth-object | ||
IpRangeBlacklist []string `json:"IpRangeBlacklist,omitempty"` | ||
|
||
// IpRangeWhitelist AWS CloudFormation Property | ||
// Required: false | ||
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#function-auth-object | ||
IpRangeWhitelist []string `json:"IpRangeWhitelist,omitempty"` | ||
|
||
// SourceVpcBlacklist AWS CloudFormation Property | ||
// Required: false | ||
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#function-auth-object | ||
SourceVpcBlacklist []string `json:"SourceVpcBlacklist,omitempty"` | ||
|
||
// SourceVpcWhitelist AWS CloudFormation Property | ||
// Required: false | ||
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#function-auth-object | ||
SourceVpcWhitelist []string `json:"SourceVpcWhitelist,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 *Function_AuthResourcePolicy) AWSCloudFormationType() string { | ||
return "AWS::Serverless::Function.AuthResourcePolicy" | ||
} |
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
Oops, something went wrong.