full_path
stringlengths 31
232
| filename
stringlengths 4
167
| content
stringlengths 0
48.3M
|
|---|---|---|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSSNSTopicPolicy.ps1
|
New-VSSNSTopicPolicy.ps1
|
function New-VSSNSTopicPolicy {
<#
.SYNOPSIS
Adds an AWS::SNS::TopicPolicy resource to the template
.DESCRIPTION
Adds an AWS::SNS::TopicPolicy resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-policy.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER PolicyDocument
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-policy.html#cfn-sns-topicpolicy-policydocument
PrimitiveType: Json
Required: True
UpdateType: Mutable
.PARAMETER Topics
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-policy.html#cfn-sns-topicpolicy-topics
DuplicatesAllowed: True
PrimitiveItemType: String
Required: True
Type: List
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.SNS.TopicPolicy')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
$PolicyDocument,
[parameter(Mandatory = $true)]
$Topics,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::SNS::TopicPolicy"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.SNS.TopicPolicy'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSSSMDocument.ps1
|
New-VSSSMDocument.ps1
|
function New-VSSSMDocument {
<#
.SYNOPSIS
Adds an AWS::SSM::Document resource to the template
.DESCRIPTION
Adds an AWS::SSM::Document resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-document.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER Content
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-document.html#cfn-ssm-document-content
PrimitiveType: Json
Required: True
UpdateType: Immutable
.PARAMETER DocumentType
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-document.html#cfn-ssm-document-documenttype
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.SSM.Document')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
$Content,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$DocumentType,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::SSM::Document"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.SSM.Document'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSEMRStep.ps1
|
New-VSEMRStep.ps1
|
function New-VSEMRStep {
<#
.SYNOPSIS
Adds an AWS::EMR::Step resource to the template
.DESCRIPTION
Adds an AWS::EMR::Step resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-step.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER ActionOnFailure
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-step.html#cfn-elasticmapreduce-step-actiononfailure
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER HadoopJarStep
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-step.html#cfn-elasticmapreduce-step-hadoopjarstep
Required: True
Type: HadoopJarStepConfig
UpdateType: Immutable
.PARAMETER JobFlowId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-step.html#cfn-elasticmapreduce-step-jobflowid
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER Name
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-step.html#cfn-elasticmapreduce-step-name
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.EMR.Step')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ActionOnFailure,
[parameter(Mandatory = $true)]
$HadoopJarStep,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$JobFlowId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Name,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::EMR::Step"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.EMR.Step'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSKMSKey.ps1
|
New-VSKMSKey.ps1
|
function New-VSKMSKey {
<#
.SYNOPSIS
Adds an AWS::KMS::Key resource to the template
.DESCRIPTION
Adds an AWS::KMS::Key resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER Description
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-description
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER EnableKeyRotation
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-enablekeyrotation
PrimitiveType: Boolean
Required: False
UpdateType: Mutable
.PARAMETER Enabled
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-enabled
PrimitiveType: Boolean
Required: False
UpdateType: Mutable
.PARAMETER KeyPolicy
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-keypolicy
PrimitiveType: Json
Required: True
UpdateType: Mutable
.PARAMETER KeyUsage
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-keyusage
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.KMS.Key')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Description,
[parameter(Mandatory = $false)]
[System.Boolean]
$EnableKeyRotation,
[parameter(Mandatory = $false)]
[System.Boolean]
$Enabled,
[parameter(Mandatory = $true)]
$KeyPolicy,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$KeyUsage,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::KMS::Key"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.KMS.Key'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSWAFRegionalWebACLAssociation.ps1
|
New-VSWAFRegionalWebACLAssociation.ps1
|
function New-VSWAFRegionalWebACLAssociation {
<#
.SYNOPSIS
Adds an AWS::WAFRegional::WebACLAssociation resource to the template
.DESCRIPTION
Adds an AWS::WAFRegional::WebACLAssociation resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-webaclassociation.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER ResourceArn
Required: True
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-webaclassociation.html#cfn-wafregional-webaclassociation-resourcearn
PrimitiveType: String
UpdateType: Immutable
.PARAMETER WebACLId
Required: True
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-webaclassociation.html#cfn-wafregional-webaclassociation-webaclid
PrimitiveType: String
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.WAFRegional.WebACLAssociation')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ResourceArn,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$WebACLId,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::WAFRegional::WebACLAssociation"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.WAFRegional.WebACLAssociation'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSRoute53RecordSet.ps1
|
New-VSRoute53RecordSet.ps1
|
function New-VSRoute53RecordSet {
<#
.SYNOPSIS
Adds an AWS::Route53::RecordSet resource to the template
.DESCRIPTION
Adds an AWS::Route53::RecordSet resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-recordset.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER AliasTarget
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-recordset.html#cfn-route53-recordset-aliastarget
Required: False
Type: AliasTarget
UpdateType: Mutable
.PARAMETER Comment
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-recordset.html#cfn-route53-recordset-comment
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER Failover
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-recordset.html#cfn-route53-recordset-failover
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER GeoLocation
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-recordset.html#cfn-route53-recordset-geolocation
Required: False
Type: GeoLocation
UpdateType: Mutable
.PARAMETER HealthCheckId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-recordset.html#cfn-route53-recordset-healthcheckid
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER HostedZoneId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-recordset.html#cfn-route53-recordset-hostedzoneid
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER HostedZoneName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-recordset.html#cfn-route53-recordset-hostedzonename
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER Name
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-recordset.html#cfn-route53-recordset-name
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER Region
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-recordset.html#cfn-route53-recordset-region
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER ResourceRecords
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-recordset.html#cfn-route53-recordset-resourcerecords
DuplicatesAllowed: True
PrimitiveItemType: String
Required: False
Type: List
UpdateType: Mutable
.PARAMETER SetIdentifier
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-recordset.html#cfn-route53-recordset-setidentifier
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER TTL
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-recordset.html#cfn-route53-recordset-ttl
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER Type
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-recordset.html#cfn-route53-recordset-type
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER Weight
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-recordset.html#cfn-route53-recordset-weight
PrimitiveType: Integer
Required: False
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.Route53.RecordSet')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
$AliasTarget,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Comment,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Failover,
[parameter(Mandatory = $false)]
$GeoLocation,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$HealthCheckId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$HostedZoneId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$HostedZoneName,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Name,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Region,
[parameter(Mandatory = $false)]
$ResourceRecords,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$SetIdentifier,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$TTL,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Type,
[parameter(Mandatory = $false)]
[Int]
$Weight,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::Route53::RecordSet"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.Route53.RecordSet'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSLogsMetricFilter.ps1
|
New-VSLogsMetricFilter.ps1
|
function New-VSLogsMetricFilter {
<#
.SYNOPSIS
Adds an AWS::Logs::MetricFilter resource to the template
.DESCRIPTION
Adds an AWS::Logs::MetricFilter resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-metricfilter.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER FilterPattern
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-metricfilter.html#cfn-cwl-metricfilter-filterpattern
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER LogGroupName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-metricfilter.html#cfn-cwl-metricfilter-loggroupname
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER MetricTransformations
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-metricfilter.html#cfn-cwl-metricfilter-metrictransformations
DuplicatesAllowed: True
ItemType: MetricTransformation
Required: True
Type: List
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.Logs.MetricFilter')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$FilterPattern,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$LogGroupName,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.Logs.MetricFilter.MetricTransformation"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$MetricTransformations,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::Logs::MetricFilter"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.Logs.MetricFilter'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSSSMParameter.ps1
|
New-VSSSMParameter.ps1
|
function New-VSSSMParameter {
<#
.SYNOPSIS
Adds an AWS::SSM::Parameter resource to the template
.DESCRIPTION
Adds an AWS::SSM::Parameter resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-parameter.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER Type
Required: True
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-parameter.html#cfn-ssm-parameter-type
PrimitiveType: String
UpdateType: Mutable
.PARAMETER Description
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-parameter.html#cfn-ssm-parameter-description
PrimitiveType: String
UpdateType: Mutable
.PARAMETER Value
Required: True
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-parameter.html#cfn-ssm-parameter-value
PrimitiveType: String
UpdateType: Mutable
.PARAMETER Name
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-parameter.html#cfn-ssm-parameter-name
PrimitiveType: String
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.SSM.Parameter')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Type,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Description,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Value,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Name,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::SSM::Parameter"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.SSM.Parameter'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSWAFXssMatchSet.ps1
|
New-VSWAFXssMatchSet.ps1
|
function New-VSWAFXssMatchSet {
<#
.SYNOPSIS
Adds an AWS::WAF::XssMatchSet resource to the template
.DESCRIPTION
Adds an AWS::WAF::XssMatchSet resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-xssmatchset.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER Name
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-xssmatchset.html#cfn-waf-xssmatchset-name
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER XssMatchTuples
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-xssmatchset.html#cfn-waf-xssmatchset-xssmatchtuples
DuplicatesAllowed: False
ItemType: XssMatchTuple
Required: True
Type: List
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.WAF.XssMatchSet')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Name,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.WAF.XssMatchSet.XssMatchTuple"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$XssMatchTuples,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::WAF::XssMatchSet"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.WAF.XssMatchSet'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSEFSMountTarget.ps1
|
New-VSEFSMountTarget.ps1
|
function New-VSEFSMountTarget {
<#
.SYNOPSIS
Adds an AWS::EFS::MountTarget resource to the template
.DESCRIPTION
Adds an AWS::EFS::MountTarget resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-efs-mounttarget.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER FileSystemId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-efs-mounttarget.html#cfn-efs-mounttarget-filesystemid
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER IpAddress
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-efs-mounttarget.html#cfn-efs-mounttarget-ipaddress
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER SecurityGroups
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-efs-mounttarget.html#cfn-efs-mounttarget-securitygroups
DuplicatesAllowed: False
PrimitiveItemType: String
Required: True
Type: List
UpdateType: Mutable
.PARAMETER SubnetId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-efs-mounttarget.html#cfn-efs-mounttarget-subnetid
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.EFS.MountTarget')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$FileSystemId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$IpAddress,
[parameter(Mandatory = $true)]
$SecurityGroups,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$SubnetId,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::EFS::MountTarget"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.EFS.MountTarget'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSS3Bucket.ps1
|
New-VSS3Bucket.ps1
|
function New-VSS3Bucket {
<#
.SYNOPSIS
Adds an AWS::S3::Bucket resource to the template
.DESCRIPTION
Adds an AWS::S3::Bucket resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER AccessControl
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-accesscontrol
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER BucketName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-name
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER CorsConfiguration
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-crossoriginconfig
Required: False
Type: CorsConfiguration
UpdateType: Mutable
.PARAMETER LifecycleConfiguration
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-lifecycleconfig
Required: False
Type: LifecycleConfiguration
UpdateType: Mutable
.PARAMETER LoggingConfiguration
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-loggingconfig
Required: False
Type: LoggingConfiguration
UpdateType: Mutable
.PARAMETER NotificationConfiguration
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-notification
Required: False
Type: NotificationConfiguration
UpdateType: Mutable
.PARAMETER ReplicationConfiguration
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-replicationconfiguration
Required: False
Type: ReplicationConfiguration
UpdateType: Mutable
.PARAMETER Tags
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-tags
DuplicatesAllowed: True
ItemType: Tag
Required: False
Type: List
UpdateType: Mutable
.PARAMETER VersioningConfiguration
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-versioning
Required: False
Type: VersioningConfiguration
UpdateType: Mutable
.PARAMETER WebsiteConfiguration
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-websiteconfiguration
Required: False
Type: WebsiteConfiguration
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.S3.Bucket')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$AccessControl,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$BucketName,
[parameter(Mandatory = $false)]
$CorsConfiguration,
[parameter(Mandatory = $false)]
$LifecycleConfiguration,
[parameter(Mandatory = $false)]
$LoggingConfiguration,
[parameter(Mandatory = $false)]
$NotificationConfiguration,
[parameter(Mandatory = $false)]
$ReplicationConfiguration,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.Tag"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Tags,
[parameter(Mandatory = $false)]
$VersioningConfiguration,
[parameter(Mandatory = $false)]
$WebsiteConfiguration,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::S3::Bucket"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.S3.Bucket'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSCloudWatchAlarm.ps1
|
New-VSCloudWatchAlarm.ps1
|
function New-VSCloudWatchAlarm {
<#
.SYNOPSIS
Adds an AWS::CloudWatch::Alarm resource to the template
.DESCRIPTION
Adds an AWS::CloudWatch::Alarm resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER ActionsEnabled
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-actionsenabled
PrimitiveType: Boolean
Required: False
UpdateType: Mutable
.PARAMETER AlarmActions
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-alarmactions
DuplicatesAllowed: True
PrimitiveItemType: String
Required: False
Type: List
UpdateType: Mutable
.PARAMETER AlarmDescription
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-alarmdescription
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER AlarmName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-alarmname
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER ComparisonOperator
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-comparisonoperator
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER Dimensions
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-dimension
DuplicatesAllowed: True
ItemType: Dimension
Required: False
Type: List
UpdateType: Mutable
.PARAMETER EvaluateLowSampleCountPercentile
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-evaluatelowsamplecountpercentile
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER EvaluationPeriods
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-evaluationperiods
PrimitiveType: Integer
Required: True
UpdateType: Mutable
.PARAMETER ExtendedStatistic
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-extendedstatistic
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER InsufficientDataActions
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-insufficientdataactions
DuplicatesAllowed: True
PrimitiveItemType: String
Required: False
Type: List
UpdateType: Mutable
.PARAMETER MetricName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-metricname
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER Namespace
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-namespace
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER OKActions
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-okactions
DuplicatesAllowed: True
PrimitiveItemType: String
Required: False
Type: List
UpdateType: Mutable
.PARAMETER Period
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-period
PrimitiveType: Integer
Required: True
UpdateType: Mutable
.PARAMETER Statistic
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-statistic
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER Threshold
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-threshold
PrimitiveType: Double
Required: True
UpdateType: Mutable
.PARAMETER TreatMissingData
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-treatmissingdata
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER Unit
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-unit
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.CloudWatch.Alarm')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[System.Boolean]
$ActionsEnabled,
[parameter(Mandatory = $false)]
$AlarmActions,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$AlarmDescription,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$AlarmName,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ComparisonOperator,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.CloudWatch.Alarm.Dimension"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Dimensions,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$EvaluateLowSampleCountPercentile,
[parameter(Mandatory = $true)]
[Int]
$EvaluationPeriods,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ExtendedStatistic,
[parameter(Mandatory = $false)]
$InsufficientDataActions,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$MetricName,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Namespace,
[parameter(Mandatory = $false)]
$OKActions,
[parameter(Mandatory = $true)]
[Int]
$Period,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Statistic,
[parameter(Mandatory = $true)]
[System.Double]
$Threshold,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$TreatMissingData,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Unit,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::CloudWatch::Alarm"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.CloudWatch.Alarm'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSWAFRegionalByteMatchSet.ps1
|
New-VSWAFRegionalByteMatchSet.ps1
|
function New-VSWAFRegionalByteMatchSet {
<#
.SYNOPSIS
Adds an AWS::WAFRegional::ByteMatchSet resource to the template
.DESCRIPTION
Adds an AWS::WAFRegional::ByteMatchSet resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-bytematchset.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER ByteMatchTuples
Type: List
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-bytematchset.html#cfn-wafregional-bytematchset-bytematchtuples
ItemType: ByteMatchTuple
UpdateType: Mutable
.PARAMETER Name
Required: True
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-bytematchset.html#cfn-wafregional-bytematchset-name
PrimitiveType: String
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.WAFRegional.ByteMatchSet')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.WAFRegional.ByteMatchSet.ByteMatchTuple"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ByteMatchTuples,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Name,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::WAFRegional::ByteMatchSet"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.WAFRegional.ByteMatchSet'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSEC2VPCEndpoint.ps1
|
New-VSEC2VPCEndpoint.ps1
|
function New-VSEC2VPCEndpoint {
<#
.SYNOPSIS
Adds an AWS::EC2::VPCEndpoint resource to the template
.DESCRIPTION
Adds an AWS::EC2::VPCEndpoint resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpoint.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER PolicyDocument
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpoint.html#cfn-ec2-vpcendpoint-policydocument
PrimitiveType: Json
Required: False
UpdateType: Mutable
.PARAMETER RouteTableIds
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpoint.html#cfn-ec2-vpcendpoint-routetableids
DuplicatesAllowed: False
PrimitiveItemType: String
Required: False
Type: List
UpdateType: Mutable
.PARAMETER ServiceName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpoint.html#cfn-ec2-vpcendpoint-servicename
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER VpcId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpoint.html#cfn-ec2-vpcendpoint-vpcid
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.EC2.VPCEndpoint')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
$PolicyDocument,
[parameter(Mandatory = $false)]
$RouteTableIds,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ServiceName,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$VpcId,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::EC2::VPCEndpoint"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.EC2.VPCEndpoint'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSCognitoUserPoolClient.ps1
|
New-VSCognitoUserPoolClient.ps1
|
function New-VSCognitoUserPoolClient {
<#
.SYNOPSIS
Adds an AWS::Cognito::UserPoolClient resource to the template
.DESCRIPTION
Adds an AWS::Cognito::UserPoolClient resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolclient.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER GenerateSecret
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolclient.html#cfn-cognito-userpoolclient-generatesecret
PrimitiveType: Boolean
UpdateType: Immutable
.PARAMETER ClientName
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolclient.html#cfn-cognito-userpoolclient-clientname
PrimitiveType: String
UpdateType: Mutable
.PARAMETER UserPoolId
Required: True
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolclient.html#cfn-cognito-userpoolclient-userpoolid
PrimitiveType: String
UpdateType: Immutable
.PARAMETER ExplicitAuthFlows
PrimitiveItemType: String
Type: List
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolclient.html#cfn-cognito-userpoolclient-explicitauthflows
UpdateType: Mutable
.PARAMETER RefreshTokenValidity
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolclient.html#cfn-cognito-userpoolclient-refreshtokenvalidity
PrimitiveType: Double
UpdateType: Mutable
.PARAMETER ReadAttributes
PrimitiveItemType: String
Type: List
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolclient.html#cfn-cognito-userpoolclient-readattributes
UpdateType: Mutable
.PARAMETER WriteAttributes
PrimitiveItemType: String
Type: List
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolclient.html#cfn-cognito-userpoolclient-writeattributes
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.Cognito.UserPoolClient')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[System.Boolean]
$GenerateSecret,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ClientName,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UserPoolId,
[parameter(Mandatory = $false)]
$ExplicitAuthFlows,
[parameter(Mandatory = $false)]
[System.Double]
$RefreshTokenValidity,
[parameter(Mandatory = $false)]
$ReadAttributes,
[parameter(Mandatory = $false)]
$WriteAttributes,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::Cognito::UserPoolClient"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.Cognito.UserPoolClient'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSElasticsearchDomain.ps1
|
New-VSElasticsearchDomain.ps1
|
function New-VSElasticsearchDomain {
<#
.SYNOPSIS
Adds an AWS::Elasticsearch::Domain resource to the template
.DESCRIPTION
Adds an AWS::Elasticsearch::Domain resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticsearch-domain.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER AccessPolicies
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticsearch-domain.html#cfn-elasticsearch-domain-accesspolicies
PrimitiveType: Json
Required: False
UpdateType: Mutable
.PARAMETER AdvancedOptions
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticsearch-domain.html#cfn-elasticsearch-domain-advancedoptions
DuplicatesAllowed: False
PrimitiveItemType: String
Required: False
Type: Map
UpdateType: Mutable
.PARAMETER DomainName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticsearch-domain.html#cfn-elasticsearch-domain-domainname
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER EBSOptions
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticsearch-domain.html#cfn-elasticsearch-domain-ebsoptions
Required: False
Type: EBSOptions
UpdateType: Mutable
.PARAMETER ElasticsearchClusterConfig
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticsearch-domain.html#cfn-elasticsearch-domain-elasticsearchclusterconfig
Required: False
Type: ElasticsearchClusterConfig
UpdateType: Mutable
.PARAMETER ElasticsearchVersion
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticsearch-domain.html#cfn-elasticsearch-domain-elasticsearchversion
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER SnapshotOptions
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticsearch-domain.html#cfn-elasticsearch-domain-snapshotoptions
Required: False
Type: SnapshotOptions
UpdateType: Mutable
.PARAMETER Tags
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticsearch-domain.html#cfn-elasticsearch-domain-tags
DuplicatesAllowed: True
ItemType: Tag
Required: False
Type: List
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.Elasticsearch.Domain')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
$AccessPolicies,
[parameter(Mandatory = $false)]
[System.Collections.Hashtable]
$AdvancedOptions,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$DomainName,
[parameter(Mandatory = $false)]
$EBSOptions,
[parameter(Mandatory = $false)]
$ElasticsearchClusterConfig,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ElasticsearchVersion,
[parameter(Mandatory = $false)]
$SnapshotOptions,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.Tag"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Tags,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::Elasticsearch::Domain"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.Elasticsearch.Domain'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSOpsWorksUserProfile.ps1
|
New-VSOpsWorksUserProfile.ps1
|
function New-VSOpsWorksUserProfile {
<#
.SYNOPSIS
Adds an AWS::OpsWorks::UserProfile resource to the template
.DESCRIPTION
Adds an AWS::OpsWorks::UserProfile resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-userprofile.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER AllowSelfManagement
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-userprofile.html#cfn-opsworks-userprofile-allowselfmanagement
PrimitiveType: Boolean
Required: False
UpdateType: Mutable
.PARAMETER IamUserArn
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-userprofile.html#cfn-opsworks-userprofile-iamuserarn
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER SshPublicKey
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-userprofile.html#cfn-opsworks-userprofile-sshpublickey
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER SshUsername
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-userprofile.html#cfn-opsworks-userprofile-sshusername
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.OpsWorks.UserProfile')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[System.Boolean]
$AllowSelfManagement,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$IamUserArn,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$SshPublicKey,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$SshUsername,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::OpsWorks::UserProfile"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.OpsWorks.UserProfile'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSApiGatewayModel.ps1
|
New-VSApiGatewayModel.ps1
|
function New-VSApiGatewayModel {
<#
.SYNOPSIS
Adds an AWS::ApiGateway::Model resource to the template
.DESCRIPTION
Adds an AWS::ApiGateway::Model resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-model.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER ContentType
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-model.html#cfn-apigateway-model-contenttype
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER Description
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-model.html#cfn-apigateway-model-description
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER Name
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-model.html#cfn-apigateway-model-name
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER RestApiId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-model.html#cfn-apigateway-model-restapiid
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER Schema
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-model.html#cfn-apigateway-model-schema
PrimitiveType: Json
Required: False
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.ApiGateway.Model')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ContentType,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Description,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Name,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$RestApiId,
[parameter(Mandatory = $false)]
$Schema,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::ApiGateway::Model"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.ApiGateway.Model'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSSSMAssociation.ps1
|
New-VSSSMAssociation.ps1
|
function New-VSSSMAssociation {
<#
.SYNOPSIS
Adds an AWS::SSM::Association resource to the template
.DESCRIPTION
Adds an AWS::SSM::Association resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-association.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER DocumentVersion
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-association.html#cfn-ssm-association-documentversion
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER InstanceId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-association.html#cfn-ssm-association-instanceid
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER Name
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-association.html#cfn-ssm-association-name
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER Parameters
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-association.html#cfn-ssm-association-parameters
DuplicatesAllowed: False
ItemType: ParameterValues
Required: False
Type: Map
UpdateType: Mutable
.PARAMETER ScheduleExpression
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-association.html#cfn-ssm-association-scheduleexpression
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER Targets
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-association.html#cfn-ssm-association-targets
DuplicatesAllowed: False
ItemType: Target
Required: False
Type: List
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.SSM.Association')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$DocumentVersion,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$InstanceId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Name,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.SSM.Association.ParameterValues"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Parameters,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ScheduleExpression,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.SSM.Association.Target"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Targets,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::SSM::Association"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.SSM.Association'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSEMRInstanceGroupConfig.ps1
|
New-VSEMRInstanceGroupConfig.ps1
|
function New-VSEMRInstanceGroupConfig {
<#
.SYNOPSIS
Adds an AWS::EMR::InstanceGroupConfig resource to the template
.DESCRIPTION
Adds an AWS::EMR::InstanceGroupConfig resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancegroupconfig.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER AutoScalingPolicy
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancegroupconfig.html#cfn-elasticmapreduce-instancegroupconfig-autoscalingpolicy
Required: False
Type: AutoScalingPolicy
UpdateType: Mutable
.PARAMETER BidPrice
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancegroupconfig.html#cfn-emr-instancegroupconfig-bidprice
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER Configurations
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancegroupconfig.html#cfn-emr-instancegroupconfig-configurations
DuplicatesAllowed: False
ItemType: Configuration
Required: False
Type: List
UpdateType: Immutable
.PARAMETER EbsConfiguration
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancegroupconfig.html#cfn-emr-instancegroupconfig-ebsconfiguration
Required: False
Type: EbsConfiguration
UpdateType: Immutable
.PARAMETER InstanceCount
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancegroupconfig.html#cfn-emr-instancegroupconfiginstancecount-
PrimitiveType: Integer
Required: True
UpdateType: Mutable
.PARAMETER InstanceRole
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancegroupconfig.html#cfn-emr-instancegroupconfig-instancerole
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER InstanceType
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancegroupconfig.html#cfn-emr-instancegroupconfig-instancetype
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER JobFlowId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancegroupconfig.html#cfn-emr-instancegroupconfig-jobflowid
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER Market
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancegroupconfig.html#cfn-emr-instancegroupconfig-market
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER Name
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancegroupconfig.html#cfn-emr-instancegroupconfig-name
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.EMR.InstanceGroupConfig')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
$AutoScalingPolicy,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$BidPrice,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.EMR.InstanceGroupConfig.Configuration"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Configurations,
[parameter(Mandatory = $false)]
$EbsConfiguration,
[parameter(Mandatory = $true)]
[Int]
$InstanceCount,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$InstanceRole,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$InstanceType,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$JobFlowId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Market,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Name,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::EMR::InstanceGroupConfig"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.EMR.InstanceGroupConfig'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSAutoScalingLaunchConfiguration.ps1
|
New-VSAutoScalingLaunchConfiguration.ps1
|
function New-VSAutoScalingLaunchConfiguration {
<#
.SYNOPSIS
Adds an AWS::AutoScaling::LaunchConfiguration resource to the template
.DESCRIPTION
Adds an AWS::AutoScaling::LaunchConfiguration resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER AssociatePublicIpAddress
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cf-as-launchconfig-associatepubip
PrimitiveType: Boolean
Required: False
UpdateType: Immutable
.PARAMETER BlockDeviceMappings
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cfn-as-launchconfig-blockdevicemappings
DuplicatesAllowed: False
ItemType: BlockDeviceMapping
Required: False
Type: List
UpdateType: Immutable
.PARAMETER ClassicLinkVPCId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cfn-as-launchconfig-classiclinkvpcid
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER ClassicLinkVPCSecurityGroups
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cfn-as-launchconfig-classiclinkvpcsecuritygroups
DuplicatesAllowed: False
PrimitiveItemType: String
Required: False
Type: List
UpdateType: Immutable
.PARAMETER EbsOptimized
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cfn-as-launchconfig-ebsoptimized
PrimitiveType: Boolean
Required: False
UpdateType: Immutable
.PARAMETER IamInstanceProfile
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cfn-as-launchconfig-iaminstanceprofile
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER ImageId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cfn-as-launchconfig-imageid
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER InstanceId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cfn-as-launchconfig-instanceid
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER InstanceMonitoring
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cfn-as-launchconfig-instancemonitoring
PrimitiveType: Boolean
Required: False
UpdateType: Immutable
.PARAMETER InstanceType
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cfn-as-launchconfig-instancetype
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER KernelId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cfn-as-launchconfig-kernelid
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER KeyName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cfn-as-launchconfig-keyname
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER PlacementTenancy
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cfn-as-launchconfig-placementtenancy
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER RamDiskId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cfn-as-launchconfig-ramdiskid
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER SecurityGroups
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cfn-as-launchconfig-securitygroups
DuplicatesAllowed: False
PrimitiveItemType: String
Required: False
Type: List
UpdateType: Immutable
.PARAMETER SpotPrice
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cfn-as-launchconfig-spotprice
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER UserData
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cfn-as-launchconfig-userdata
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.AutoScaling.LaunchConfiguration')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[System.Boolean]
$AssociatePublicIpAddress,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.AutoScaling.LaunchConfiguration.BlockDeviceMapping"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$BlockDeviceMappings,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ClassicLinkVPCId,
[parameter(Mandatory = $false)]
$ClassicLinkVPCSecurityGroups,
[parameter(Mandatory = $false)]
[System.Boolean]
$EbsOptimized,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$IamInstanceProfile,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ImageId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$InstanceId,
[parameter(Mandatory = $false)]
[System.Boolean]
$InstanceMonitoring,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$InstanceType,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$KernelId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$KeyName,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$PlacementTenancy,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$RamDiskId,
[parameter(Mandatory = $false)]
$SecurityGroups,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$SpotPrice,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UserData,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::AutoScaling::LaunchConfiguration"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.AutoScaling.LaunchConfiguration'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSEC2NetworkAclEntry.ps1
|
New-VSEC2NetworkAclEntry.ps1
|
function New-VSEC2NetworkAclEntry {
<#
.SYNOPSIS
Adds an AWS::EC2::NetworkAclEntry resource to the template
.DESCRIPTION
Adds an AWS::EC2::NetworkAclEntry resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-acl-entry.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER CidrBlock
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-acl-entry.html#cfn-ec2-networkaclentry-cidrblock
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER Egress
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-acl-entry.html#cfn-ec2-networkaclentry-egress
PrimitiveType: Boolean
Required: False
UpdateType: Immutable
.PARAMETER Icmp
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-acl-entry.html#cfn-ec2-networkaclentry-icmp
Required: False
Type: Icmp
UpdateType: Mutable
.PARAMETER Ipv6CidrBlock
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-acl-entry.html#cfn-ec2-networkaclentry-ipv6cidrblock
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER NetworkAclId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-acl-entry.html#cfn-ec2-networkaclentry-networkaclid
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER PortRange
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-acl-entry.html#cfn-ec2-networkaclentry-portrange
Required: False
Type: PortRange
UpdateType: Mutable
.PARAMETER Protocol
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-acl-entry.html#cfn-ec2-networkaclentry-protocol
PrimitiveType: Integer
Required: True
UpdateType: Mutable
.PARAMETER RuleAction
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-acl-entry.html#cfn-ec2-networkaclentry-ruleaction
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER RuleNumber
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-acl-entry.html#cfn-ec2-networkaclentry-rulenumber
PrimitiveType: Integer
Required: True
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.EC2.NetworkAclEntry')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$CidrBlock,
[parameter(Mandatory = $false)]
[System.Boolean]
$Egress,
[parameter(Mandatory = $false)]
$Icmp,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Ipv6CidrBlock,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$NetworkAclId,
[parameter(Mandatory = $false)]
$PortRange,
[parameter(Mandatory = $true)]
[Int]
$Protocol,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$RuleAction,
[parameter(Mandatory = $true)]
[Int]
$RuleNumber,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::EC2::NetworkAclEntry"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.EC2.NetworkAclEntry'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSKMSAlias.ps1
|
New-VSKMSAlias.ps1
|
function New-VSKMSAlias {
<#
.SYNOPSIS
Adds an AWS::KMS::Alias resource to the template
.DESCRIPTION
Adds an AWS::KMS::Alias resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-alias.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER AliasName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-alias.html#cfn-kms-alias-aliasname
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER TargetKeyId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-alias.html#cfn-kms-alias-targetkeyid
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.KMS.Alias')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$AliasName,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$TargetKeyId,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::KMS::Alias"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.KMS.Alias'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSEC2SecurityGroup.ps1
|
New-VSEC2SecurityGroup.ps1
|
function New-VSEC2SecurityGroup {
<#
.SYNOPSIS
Adds an AWS::EC2::SecurityGroup resource to the template
.DESCRIPTION
Adds an AWS::EC2::SecurityGroup resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER GroupDescription
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group.html#cfn-ec2-securitygroup-groupdescription
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER GroupName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group.html#cfn-ec2-securitygroup-groupname
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER SecurityGroupEgress
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group.html#cfn-ec2-securitygroup-securitygroupegress
DuplicatesAllowed: True
ItemType: Rule
Required: False
Type: List
UpdateType: Mutable
.PARAMETER SecurityGroupIngress
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group.html#cfn-ec2-securitygroup-securitygroupingress
DuplicatesAllowed: True
ItemType: Rule
Required: False
Type: List
UpdateType: Mutable
.PARAMETER Tags
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group.html#cfn-ec2-securitygroup-tags
DuplicatesAllowed: True
ItemType: Tag
Required: False
Type: List
UpdateType: Mutable
.PARAMETER VpcId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group.html#cfn-ec2-securitygroup-vpcid
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.EC2.SecurityGroup')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$GroupDescription,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$GroupName,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.EC2.SecurityGroup.Rule"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$SecurityGroupEgress,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.EC2.SecurityGroup.Rule"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$SecurityGroupIngress,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.Tag"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Tags,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$VpcId,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::EC2::SecurityGroup"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.EC2.SecurityGroup'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSOpsWorksElasticLoadBalancerAttachment.ps1
|
New-VSOpsWorksElasticLoadBalancerAttachment.ps1
|
function New-VSOpsWorksElasticLoadBalancerAttachment {
<#
.SYNOPSIS
Adds an AWS::OpsWorks::ElasticLoadBalancerAttachment resource to the template
.DESCRIPTION
Adds an AWS::OpsWorks::ElasticLoadBalancerAttachment resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-elbattachment.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER ElasticLoadBalancerName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-elbattachment.html#cfn-opsworks-elbattachment-elbname
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER LayerId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-elbattachment.html#cfn-opsworks-elbattachment-layerid
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.OpsWorks.ElasticLoadBalancerAttachment')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ElasticLoadBalancerName,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$LayerId,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::OpsWorks::ElasticLoadBalancerAttachment"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.OpsWorks.ElasticLoadBalancerAttachment'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSRoute53HostedZone.ps1
|
New-VSRoute53HostedZone.ps1
|
function New-VSRoute53HostedZone {
<#
.SYNOPSIS
Adds an AWS::Route53::HostedZone resource to the template
.DESCRIPTION
Adds an AWS::Route53::HostedZone resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-hostedzone.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER HostedZoneConfig
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-hostedzone.html#cfn-route53-hostedzone-hostedzoneconfig
Required: False
Type: HostedZoneConfig
UpdateType: Mutable
.PARAMETER HostedZoneTags
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-hostedzone.html#cfn-route53-hostedzone-hostedzonetags
DuplicatesAllowed: True
ItemType: HostedZoneTag
Required: False
Type: List
UpdateType: Mutable
.PARAMETER Name
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-hostedzone.html#cfn-route53-hostedzone-name
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER VPCs
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-hostedzone.html#cfn-route53-hostedzone-vpcs
DuplicatesAllowed: True
ItemType: VPC
Required: False
Type: List
UpdateType: Conditional
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.Route53.HostedZone')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
$HostedZoneConfig,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.Route53.HostedZone.HostedZoneTag"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$HostedZoneTags,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Name,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.Route53.HostedZone.VPC"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$VPCs,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::Route53::HostedZone"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.Route53.HostedZone'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSCloudFormationWaitCondition.ps1
|
New-VSCloudFormationWaitCondition.ps1
|
function New-VSCloudFormationWaitCondition {
<#
.SYNOPSIS
Adds an AWS::CloudFormation::WaitCondition resource to the template
.DESCRIPTION
Adds an AWS::CloudFormation::WaitCondition resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-waitcondition.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER Count
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-waitcondition.html#cfn-waitcondition-count
PrimitiveType: Integer
Required: False
UpdateType: Mutable
.PARAMETER Handle
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-waitcondition.html#cfn-waitcondition-handle
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER Timeout
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-waitcondition.html#cfn-waitcondition-timeout
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER CreationPolicy
Use the CreationPolicy attribute when you want to wait on resource configuration actions before stack creation proceeds. For example, if you install and configure software applications on an EC2 instance, you might want those applications to be running before proceeding. In such cases, you can add a CreationPolicy attribute to the instance, and then send a success signal to the instance after the applications are installed and configured.
You must use the "Add-CreationPolicy" function here.
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.CloudFormation.WaitCondition')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[Int]
$Count,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Handle,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Timeout,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.CreationPolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$CreationPolicy,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::CloudFormation::WaitCondition"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'CreationPolicy' {
$ResourceParams.Add("CreationPolicy",$CreationPolicy)
}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.CloudFormation.WaitCondition'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSCodePipelineCustomActionType.ps1
|
New-VSCodePipelineCustomActionType.ps1
|
function New-VSCodePipelineCustomActionType {
<#
.SYNOPSIS
Adds an AWS::CodePipeline::CustomActionType resource to the template
.DESCRIPTION
Adds an AWS::CodePipeline::CustomActionType resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codepipeline-customactiontype.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER Category
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codepipeline-customactiontype.html#cfn-codepipeline-customactiontype-category
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER ConfigurationProperties
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codepipeline-customactiontype.html#cfn-codepipeline-customactiontype-configurationproperties
DuplicatesAllowed: False
ItemType: ConfigurationProperties
Required: False
Type: List
UpdateType: Immutable
.PARAMETER InputArtifactDetails
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codepipeline-customactiontype.html#cfn-codepipeline-customactiontype-inputartifactdetails
Required: True
Type: ArtifactDetails
UpdateType: Immutable
.PARAMETER OutputArtifactDetails
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codepipeline-customactiontype.html#cfn-codepipeline-customactiontype-outputartifactdetails
Required: True
Type: ArtifactDetails
UpdateType: Immutable
.PARAMETER Provider
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codepipeline-customactiontype.html#cfn-codepipeline-customactiontype-provider
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER Settings
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codepipeline-customactiontype.html#cfn-codepipeline-customactiontype-settings
Required: False
Type: Settings
UpdateType: Immutable
.PARAMETER Version
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codepipeline-customactiontype.html#cfn-codepipeline-customactiontype-version
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.CodePipeline.CustomActionType')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Category,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.CodePipeline.CustomActionType.ConfigurationProperties"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ConfigurationProperties,
[parameter(Mandatory = $true)]
$InputArtifactDetails,
[parameter(Mandatory = $true)]
$OutputArtifactDetails,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Provider,
[parameter(Mandatory = $false)]
$Settings,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Version,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::CodePipeline::CustomActionType"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.CodePipeline.CustomActionType'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSCodeDeployApplication.ps1
|
New-VSCodeDeployApplication.ps1
|
function New-VSCodeDeployApplication {
<#
.SYNOPSIS
Adds an AWS::CodeDeploy::Application resource to the template
.DESCRIPTION
Adds an AWS::CodeDeploy::Application resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-application.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER ApplicationName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-application.html#cfn-codedeploy-application-applicationname
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.CodeDeploy.Application')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ApplicationName,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::CodeDeploy::Application"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.CodeDeploy.Application'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSEMRSecurityConfiguration.ps1
|
New-VSEMRSecurityConfiguration.ps1
|
function New-VSEMRSecurityConfiguration {
<#
.SYNOPSIS
Adds an AWS::EMR::SecurityConfiguration resource to the template
.DESCRIPTION
Adds an AWS::EMR::SecurityConfiguration resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-securityconfiguration.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER Name
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-securityconfiguration.html#cfn-emr-securityconfiguration-name
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER SecurityConfiguration
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-securityconfiguration.html#cfn-emr-securityconfiguration-securityconfiguration
PrimitiveType: Json
Required: True
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.EMR.SecurityConfiguration')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Name,
[parameter(Mandatory = $true)]
$SecurityConfiguration,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::EMR::SecurityConfiguration"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.EMR.SecurityConfiguration'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSEC2SpotFleet.ps1
|
New-VSEC2SpotFleet.ps1
|
function New-VSEC2SpotFleet {
<#
.SYNOPSIS
Adds an AWS::EC2::SpotFleet resource to the template
.DESCRIPTION
Adds an AWS::EC2::SpotFleet resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-spotfleet.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER SpotFleetRequestConfigData
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-spotfleet.html#cfn-ec2-spotfleet-spotfleetrequestconfigdata
Required: True
Type: SpotFleetRequestConfigData
UpdateType: Conditional
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.EC2.SpotFleet')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
$SpotFleetRequestConfigData,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::EC2::SpotFleet"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.EC2.SpotFleet'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSElastiCacheReplicationGroup.ps1
|
New-VSElastiCacheReplicationGroup.ps1
|
function New-VSElastiCacheReplicationGroup {
<#
.SYNOPSIS
Adds an AWS::ElastiCache::ReplicationGroup resource to the template
.DESCRIPTION
Adds an AWS::ElastiCache::ReplicationGroup resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER AutoMinorVersionUpgrade
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-autominorversionupgrade
PrimitiveType: Boolean
Required: False
UpdateType: Mutable
.PARAMETER AutomaticFailoverEnabled
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-automaticfailoverenabled
PrimitiveType: Boolean
Required: False
UpdateType: Mutable
.PARAMETER CacheNodeType
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-cachenodetype
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER CacheParameterGroupName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-cacheparametergroupname
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER CacheSecurityGroupNames
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-cachesecuritygroupnames
DuplicatesAllowed: False
PrimitiveItemType: String
Required: False
Type: List
UpdateType: Mutable
.PARAMETER CacheSubnetGroupName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-cachesubnetgroupname
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER Engine
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-engine
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER EngineVersion
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-engineversion
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER NodeGroupConfiguration
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-nodegroupconfiguration
DuplicatesAllowed: False
ItemType: NodeGroupConfiguration
Required: False
Type: List
UpdateType: Immutable
.PARAMETER NotificationTopicArn
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-notificationtopicarn
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER NumCacheClusters
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-numcacheclusters
PrimitiveType: Integer
Required: False
UpdateType: Mutable
.PARAMETER NumNodeGroups
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-numnodegroups
PrimitiveType: Integer
Required: False
UpdateType: Immutable
.PARAMETER Port
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-port
PrimitiveType: Integer
Required: False
UpdateType: Immutable
.PARAMETER PreferredCacheClusterAZs
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-preferredcacheclusterazs
DuplicatesAllowed: False
PrimitiveItemType: String
Required: False
Type: List
UpdateType: Immutable
.PARAMETER PreferredMaintenanceWindow
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-preferredmaintenancewindow
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER PrimaryClusterId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-primaryclusterid
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER ReplicasPerNodeGroup
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-replicaspernodegroup
PrimitiveType: Integer
Required: False
UpdateType: Immutable
.PARAMETER ReplicationGroupDescription
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-replicationgroupdescription
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER ReplicationGroupId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-replicationgroupid
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER SecurityGroupIds
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-securitygroupids
DuplicatesAllowed: False
PrimitiveItemType: String
Required: False
Type: List
UpdateType: Mutable
.PARAMETER SnapshotArns
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-snapshotarns
DuplicatesAllowed: False
PrimitiveItemType: String
Required: False
Type: List
UpdateType: Immutable
.PARAMETER SnapshotName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-snapshotname
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER SnapshotRetentionLimit
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-snapshotretentionlimit
PrimitiveType: Integer
Required: False
UpdateType: Mutable
.PARAMETER SnapshotWindow
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-snapshotwindow
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER SnapshottingClusterId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-snapshottingclusterid
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER Tags
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html#cfn-elasticache-replicationgroup-tags
DuplicatesAllowed: True
ItemType: Tag
Required: False
Type: List
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.ElastiCache.ReplicationGroup')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[System.Boolean]
$AutoMinorVersionUpgrade,
[parameter(Mandatory = $false)]
[System.Boolean]
$AutomaticFailoverEnabled,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$CacheNodeType,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$CacheParameterGroupName,
[parameter(Mandatory = $false)]
$CacheSecurityGroupNames,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$CacheSubnetGroupName,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Engine,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$EngineVersion,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.ElastiCache.ReplicationGroup.NodeGroupConfiguration"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$NodeGroupConfiguration,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$NotificationTopicArn,
[parameter(Mandatory = $false)]
[Int]
$NumCacheClusters,
[parameter(Mandatory = $false)]
[Int]
$NumNodeGroups,
[parameter(Mandatory = $false)]
[Int]
$Port,
[parameter(Mandatory = $false)]
$PreferredCacheClusterAZs,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$PreferredMaintenanceWindow,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$PrimaryClusterId,
[parameter(Mandatory = $false)]
[Int]
$ReplicasPerNodeGroup,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ReplicationGroupDescription,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ReplicationGroupId,
[parameter(Mandatory = $false)]
$SecurityGroupIds,
[parameter(Mandatory = $false)]
$SnapshotArns,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$SnapshotName,
[parameter(Mandatory = $false)]
[Int]
$SnapshotRetentionLimit,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$SnapshotWindow,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$SnapshottingClusterId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.Tag"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Tags,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::ElastiCache::ReplicationGroup"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.ElastiCache.ReplicationGroup'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSEC2VPC.ps1
|
New-VSEC2VPC.ps1
|
function New-VSEC2VPC {
<#
.SYNOPSIS
Adds an AWS::EC2::VPC resource to the template
.DESCRIPTION
Adds an AWS::EC2::VPC resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpc.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER CidrBlock
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpc.html#cfn-aws-ec2-vpc-cidrblock
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER EnableDnsHostnames
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpc.html#cfn-aws-ec2-vpc-EnableDnsHostnames
PrimitiveType: Boolean
Required: False
UpdateType: Mutable
.PARAMETER EnableDnsSupport
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpc.html#cfn-aws-ec2-vpc-EnableDnsSupport
PrimitiveType: Boolean
Required: False
UpdateType: Mutable
.PARAMETER InstanceTenancy
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpc.html#cfn-aws-ec2-vpc-instancetenancy
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER Tags
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpc.html#cfn-aws-ec2-vpc-tags
DuplicatesAllowed: True
ItemType: Tag
Required: False
Type: List
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.EC2.VPC')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$CidrBlock,
[parameter(Mandatory = $false)]
[System.Boolean]
$EnableDnsHostnames,
[parameter(Mandatory = $false)]
[System.Boolean]
$EnableDnsSupport,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$InstanceTenancy,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.Tag"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Tags,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::EC2::VPC"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.EC2.VPC'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSEC2VPNGateway.ps1
|
New-VSEC2VPNGateway.ps1
|
function New-VSEC2VPNGateway {
<#
.SYNOPSIS
Adds an AWS::EC2::VPNGateway resource to the template
.DESCRIPTION
Adds an AWS::EC2::VPNGateway resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpn-gateway.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER Tags
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpn-gateway.html#cfn-ec2-vpngateway-tags
DuplicatesAllowed: True
ItemType: Tag
Required: False
Type: List
UpdateType: Mutable
.PARAMETER Type
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpn-gateway.html#cfn-ec2-vpngateway-type
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.EC2.VPNGateway')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.Tag"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Tags,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Type,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::EC2::VPNGateway"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.EC2.VPNGateway'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSEC2VPCDHCPOptionsAssociation.ps1
|
New-VSEC2VPCDHCPOptionsAssociation.ps1
|
function New-VSEC2VPCDHCPOptionsAssociation {
<#
.SYNOPSIS
Adds an AWS::EC2::VPCDHCPOptionsAssociation resource to the template
.DESCRIPTION
Adds an AWS::EC2::VPCDHCPOptionsAssociation resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpc-dhcp-options-assoc.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER DhcpOptionsId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpc-dhcp-options-assoc.html#cfn-ec2-vpcdhcpoptionsassociation-dhcpoptionsid
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER VpcId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpc-dhcp-options-assoc.html#cfn-ec2-vpcdhcpoptionsassociation-vpcid
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.EC2.VPCDHCPOptionsAssociation')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$DhcpOptionsId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$VpcId,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::EC2::VPCDHCPOptionsAssociation"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.EC2.VPCDHCPOptionsAssociation'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSOpsWorksLayer.ps1
|
New-VSOpsWorksLayer.ps1
|
function New-VSOpsWorksLayer {
<#
.SYNOPSIS
Adds an AWS::OpsWorks::Layer resource to the template
.DESCRIPTION
Adds an AWS::OpsWorks::Layer resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-layer.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER Attributes
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-layer.html#cfn-opsworks-layer-attributes
DuplicatesAllowed: False
PrimitiveItemType: String
Required: False
Type: Map
UpdateType: Mutable
.PARAMETER AutoAssignElasticIps
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-layer.html#cfn-opsworks-layer-autoassignelasticips
PrimitiveType: Boolean
Required: True
UpdateType: Mutable
.PARAMETER AutoAssignPublicIps
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-layer.html#cfn-opsworks-layer-autoassignpublicips
PrimitiveType: Boolean
Required: True
UpdateType: Mutable
.PARAMETER CustomInstanceProfileArn
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-layer.html#cfn-opsworks-layer-custominstanceprofilearn
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER CustomJson
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-layer.html#cfn-opsworks-layer-customjson
PrimitiveType: Json
Required: False
UpdateType: Mutable
.PARAMETER CustomRecipes
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-layer.html#cfn-opsworks-layer-customrecipes
Required: False
Type: Recipes
UpdateType: Mutable
.PARAMETER CustomSecurityGroupIds
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-layer.html#cfn-opsworks-layer-customsecuritygroupids
DuplicatesAllowed: True
PrimitiveItemType: String
Required: False
Type: List
UpdateType: Mutable
.PARAMETER EnableAutoHealing
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-layer.html#cfn-opsworks-layer-enableautohealing
PrimitiveType: Boolean
Required: True
UpdateType: Mutable
.PARAMETER InstallUpdatesOnBoot
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-layer.html#cfn-opsworks-layer-installupdatesonboot
PrimitiveType: Boolean
Required: False
UpdateType: Mutable
.PARAMETER LifecycleEventConfiguration
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-layer.html#cfn-opsworks-layer-lifecycleeventconfiguration
Required: False
Type: LifecycleEventConfiguration
UpdateType: Mutable
.PARAMETER LoadBasedAutoScaling
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-layer.html#cfn-opsworks-layer-loadbasedautoscaling
Required: False
Type: LoadBasedAutoScaling
UpdateType: Mutable
.PARAMETER Name
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-layer.html#cfn-opsworks-layer-name
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER Packages
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-layer.html#cfn-opsworks-layer-packages
DuplicatesAllowed: True
PrimitiveItemType: String
Required: False
Type: List
UpdateType: Mutable
.PARAMETER Shortname
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-layer.html#cfn-opsworks-layer-shortname
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER StackId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-layer.html#cfn-opsworks-layer-stackid
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER Type
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-layer.html#cfn-opsworks-layer-type
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER UseEbsOptimizedInstances
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-layer.html#cfn-opsworks-layer-useebsoptimizedinstances
PrimitiveType: Boolean
Required: False
UpdateType: Mutable
.PARAMETER VolumeConfigurations
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-layer.html#cfn-opsworks-layer-volumeconfigurations
DuplicatesAllowed: True
ItemType: VolumeConfiguration
Required: False
Type: List
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.OpsWorks.Layer')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[System.Collections.Hashtable]
$Attributes,
[parameter(Mandatory = $true)]
[System.Boolean]
$AutoAssignElasticIps,
[parameter(Mandatory = $true)]
[System.Boolean]
$AutoAssignPublicIps,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$CustomInstanceProfileArn,
[parameter(Mandatory = $false)]
$CustomJson,
[parameter(Mandatory = $false)]
$CustomRecipes,
[parameter(Mandatory = $false)]
$CustomSecurityGroupIds,
[parameter(Mandatory = $true)]
[System.Boolean]
$EnableAutoHealing,
[parameter(Mandatory = $false)]
[System.Boolean]
$InstallUpdatesOnBoot,
[parameter(Mandatory = $false)]
$LifecycleEventConfiguration,
[parameter(Mandatory = $false)]
$LoadBasedAutoScaling,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Name,
[parameter(Mandatory = $false)]
$Packages,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Shortname,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$StackId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Type,
[parameter(Mandatory = $false)]
[System.Boolean]
$UseEbsOptimizedInstances,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.OpsWorks.Layer.VolumeConfiguration"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$VolumeConfigurations,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::OpsWorks::Layer"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.OpsWorks.Layer'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSLambdaEventSourceMapping.ps1
|
New-VSLambdaEventSourceMapping.ps1
|
function New-VSLambdaEventSourceMapping {
<#
.SYNOPSIS
Adds an AWS::Lambda::EventSourceMapping resource to the template
.DESCRIPTION
Adds an AWS::Lambda::EventSourceMapping resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER BatchSize
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-batchsize
PrimitiveType: Integer
Required: False
UpdateType: Mutable
.PARAMETER Enabled
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-enabled
PrimitiveType: Boolean
Required: False
UpdateType: Mutable
.PARAMETER EventSourceArn
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-eventsourcearn
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER FunctionName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-functionname
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER StartingPosition
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-startingposition
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.Lambda.EventSourceMapping')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[Int]
$BatchSize,
[parameter(Mandatory = $false)]
[System.Boolean]
$Enabled,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$EventSourceArn,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$FunctionName,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$StartingPosition,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::Lambda::EventSourceMapping"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.Lambda.EventSourceMapping'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSIoTCertificate.ps1
|
New-VSIoTCertificate.ps1
|
function New-VSIoTCertificate {
<#
.SYNOPSIS
Adds an AWS::IoT::Certificate resource to the template
.DESCRIPTION
Adds an AWS::IoT::Certificate resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-certificate.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER CertificateSigningRequest
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-certificate.html#cfn-iot-certificate-certificatesigningrequest
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER Status
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-certificate.html#cfn-iot-certificate-status
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.IoT.Certificate')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$CertificateSigningRequest,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Status,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::IoT::Certificate"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.IoT.Certificate'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSWAFRegionalSqlInjectionMatchSet.ps1
|
New-VSWAFRegionalSqlInjectionMatchSet.ps1
|
function New-VSWAFRegionalSqlInjectionMatchSet {
<#
.SYNOPSIS
Adds an AWS::WAFRegional::SqlInjectionMatchSet resource to the template
.DESCRIPTION
Adds an AWS::WAFRegional::SqlInjectionMatchSet resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-sqlinjectionmatchset.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER SqlInjectionMatchTuples
Type: List
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-sqlinjectionmatchset.html#cfn-wafregional-sqlinjectionmatchset-sqlinjectionmatchtuples
ItemType: SqlInjectionMatchTuple
UpdateType: Mutable
.PARAMETER Name
Required: True
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-sqlinjectionmatchset.html#cfn-wafregional-sqlinjectionmatchset-name
PrimitiveType: String
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.WAFRegional.SqlInjectionMatchSet')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.WAFRegional.SqlInjectionMatchSet.SqlInjectionMatchTuple"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$SqlInjectionMatchTuples,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Name,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::WAFRegional::SqlInjectionMatchSet"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.WAFRegional.SqlInjectionMatchSet'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSElasticBeanstalkApplication.ps1
|
New-VSElasticBeanstalkApplication.ps1
|
function New-VSElasticBeanstalkApplication {
<#
.SYNOPSIS
Adds an AWS::ElasticBeanstalk::Application resource to the template
.DESCRIPTION
Adds an AWS::ElasticBeanstalk::Application resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-beanstalk.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER ApplicationName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-beanstalk.html#cfn-elasticbeanstalk-application-name
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER Description
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-beanstalk.html#cfn-elasticbeanstalk-application-description
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.ElasticBeanstalk.Application')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ApplicationName,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Description,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::ElasticBeanstalk::Application"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.ElasticBeanstalk.Application'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSApiGatewayResource.ps1
|
New-VSApiGatewayResource.ps1
|
function New-VSApiGatewayResource {
<#
.SYNOPSIS
Adds an AWS::ApiGateway::Resource resource to the template
.DESCRIPTION
Adds an AWS::ApiGateway::Resource resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-resource.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER ParentId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-resource.html#cfn-apigateway-resource-parentid
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER PathPart
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-resource.html#cfn-apigateway-resource-pathpart
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER RestApiId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-resource.html#cfn-apigateway-resource-restapiid
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.ApiGateway.Resource')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ParentId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$PathPart,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$RestApiId,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::ApiGateway::Resource"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.ApiGateway.Resource'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSApiGatewayMethod.ps1
|
New-VSApiGatewayMethod.ps1
|
function New-VSApiGatewayMethod {
<#
.SYNOPSIS
Adds an AWS::ApiGateway::Method resource to the template
.DESCRIPTION
Adds an AWS::ApiGateway::Method resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER ApiKeyRequired
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-apikeyrequired
PrimitiveType: Boolean
Required: False
UpdateType: Mutable
.PARAMETER AuthorizationType
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-authorizationtype
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER AuthorizerId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-authorizerid
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER HttpMethod
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-httpmethod
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER Integration
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-integration
Required: False
Type: Integration
UpdateType: Mutable
.PARAMETER MethodResponses
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-methodresponses
DuplicatesAllowed: False
ItemType: MethodResponse
Required: False
Type: List
UpdateType: Mutable
.PARAMETER RequestModels
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-requestmodels
DuplicatesAllowed: False
PrimitiveItemType: String
Required: False
Type: Map
UpdateType: Mutable
.PARAMETER RequestParameters
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-requestparameters
DuplicatesAllowed: False
PrimitiveItemType: Boolean
Required: False
Type: Map
UpdateType: Mutable
.PARAMETER ResourceId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-resourceid
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER RestApiId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-restapiid
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.ApiGateway.Method')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[System.Boolean]
$ApiKeyRequired,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$AuthorizationType,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$AuthorizerId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$HttpMethod,
[parameter(Mandatory = $false)]
$Integration,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.ApiGateway.Method.MethodResponse"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$MethodResponses,
[parameter(Mandatory = $false)]
[System.Collections.Hashtable]
$RequestModels,
[parameter(Mandatory = $false)]
[System.Collections.Hashtable]
$RequestParameters,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ResourceId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$RestApiId,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::ApiGateway::Method"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.ApiGateway.Method'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSGameLiftAlias.ps1
|
New-VSGameLiftAlias.ps1
|
function New-VSGameLiftAlias {
<#
.SYNOPSIS
Adds an AWS::GameLift::Alias resource to the template
.DESCRIPTION
Adds an AWS::GameLift::Alias resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-alias.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER Description
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-alias.html#cfn-gamelift-alias-description
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER Name
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-alias.html#cfn-gamelift-alias-name
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER RoutingStrategy
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-alias.html#cfn-gamelift-alias-routingstrategy
Required: True
Type: RoutingStrategy
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.GameLift.Alias')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Description,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Name,
[parameter(Mandatory = $true)]
$RoutingStrategy,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::GameLift::Alias"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.GameLift.Alias'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSECRRepository.ps1
|
New-VSECRRepository.ps1
|
function New-VSECRRepository {
<#
.SYNOPSIS
Adds an AWS::ECR::Repository resource to the template
.DESCRIPTION
Adds an AWS::ECR::Repository resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-repository.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER RepositoryName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-repository.html#cfn-ecr-repository-repositoryname
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER RepositoryPolicyText
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-repository.html#cfn-ecr-repository-repositorypolicytext
PrimitiveType: Json
Required: False
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.ECR.Repository')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$RepositoryName,
[parameter(Mandatory = $false)]
$RepositoryPolicyText,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::ECR::Repository"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.ECR.Repository'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSWorkSpacesWorkspace.ps1
|
New-VSWorkSpacesWorkspace.ps1
|
function New-VSWorkSpacesWorkspace {
<#
.SYNOPSIS
Adds an AWS::WorkSpaces::Workspace resource to the template
.DESCRIPTION
Adds an AWS::WorkSpaces::Workspace resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspaces-workspace.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER BundleId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspaces-workspace.html#cfn-workspaces-workspace-bundleid
PrimitiveType: String
Required: True
UpdateType: Conditional
.PARAMETER DirectoryId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspaces-workspace.html#cfn-workspaces-workspace-directoryid
PrimitiveType: String
Required: True
UpdateType: Conditional
.PARAMETER RootVolumeEncryptionEnabled
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspaces-workspace.html#cfn-workspaces-workspace-rootvolumeencryptionenabled
PrimitiveType: Boolean
Required: False
UpdateType: Conditional
.PARAMETER UserName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspaces-workspace.html#cfn-workspaces-workspace-username
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER UserVolumeEncryptionEnabled
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspaces-workspace.html#cfn-workspaces-workspace-uservolumeencryptionenabled
PrimitiveType: Boolean
Required: False
UpdateType: Conditional
.PARAMETER VolumeEncryptionKey
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspaces-workspace.html#cfn-workspaces-workspace-volumeencryptionkey
PrimitiveType: String
Required: False
UpdateType: Conditional
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.WorkSpaces.Workspace')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$BundleId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$DirectoryId,
[parameter(Mandatory = $false)]
[System.Boolean]
$RootVolumeEncryptionEnabled,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UserName,
[parameter(Mandatory = $false)]
[System.Boolean]
$UserVolumeEncryptionEnabled,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$VolumeEncryptionKey,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::WorkSpaces::Workspace"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.WorkSpaces.Workspace'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSIoTThing.ps1
|
New-VSIoTThing.ps1
|
function New-VSIoTThing {
<#
.SYNOPSIS
Adds an AWS::IoT::Thing resource to the template
.DESCRIPTION
Adds an AWS::IoT::Thing resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-thing.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER AttributePayload
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-thing.html#cfn-iot-thing-attributepayload
Required: False
Type: AttributePayload
UpdateType: Mutable
.PARAMETER ThingName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-thing.html#cfn-iot-thing-thingname
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.IoT.Thing')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
$AttributePayload,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ThingName,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::IoT::Thing"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.IoT.Thing'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSCloudFormationStack.ps1
|
New-VSCloudFormationStack.ps1
|
function New-VSCloudFormationStack {
<#
.SYNOPSIS
Adds an AWS::CloudFormation::Stack resource to the template
.DESCRIPTION
Adds an AWS::CloudFormation::Stack resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stack.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER NotificationARNs
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stack.html#cfn-cloudformation-stack-notificationarns
DuplicatesAllowed: False
PrimitiveItemType: String
Required: False
Type: List
UpdateType: Mutable
.PARAMETER Parameters
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stack.html#cfn-cloudformation-stack-parameters
DuplicatesAllowed: False
PrimitiveItemType: String
Required: False
Type: Map
UpdateType: Mutable
.PARAMETER Tags
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stack.html#cfn-cloudformation-stack-tags
DuplicatesAllowed: True
ItemType: Tag
Required: False
Type: List
UpdateType: Mutable
.PARAMETER TemplateURL
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stack.html#cfn-cloudformation-stack-templateurl
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER TimeoutInMinutes
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stack.html#cfn-cloudformation-stack-timeoutinminutes
PrimitiveType: Integer
Required: False
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.CloudFormation.Stack')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
$NotificationARNs,
[parameter(Mandatory = $false)]
[System.Collections.Hashtable]
$Parameters,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.Tag"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Tags,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$TemplateURL,
[parameter(Mandatory = $false)]
[Int]
$TimeoutInMinutes,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::CloudFormation::Stack"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.CloudFormation.Stack'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSLambdaFunction.ps1
|
New-VSLambdaFunction.ps1
|
function New-VSLambdaFunction {
<#
.SYNOPSIS
Adds an AWS::Lambda::Function resource to the template
.DESCRIPTION
Adds an AWS::Lambda::Function resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER Code
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-code
Required: True
Type: Code
UpdateType: Mutable
.PARAMETER DeadLetterConfig
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-deadletterconfig
Required: False
Type: DeadLetterConfig
UpdateType: Mutable
.PARAMETER Description
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-description
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER Environment
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-environment
Required: False
Type: Environment
UpdateType: Mutable
.PARAMETER FunctionName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-functionname
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER Handler
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-handler
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER KmsKeyArn
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-kmskeyarn
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER MemorySize
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-memorysize
PrimitiveType: Integer
Required: False
UpdateType: Mutable
.PARAMETER Role
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-role
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER Runtime
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-runtime
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER Tags
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-tags
DuplicatesAllowed: True
ItemType: Tag
Required: False
Type: List
UpdateType: Mutable
.PARAMETER Timeout
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-timeout
PrimitiveType: Integer
Required: False
UpdateType: Mutable
.PARAMETER TracingConfig
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-tracingconfig
Required: False
Type: TracingConfig
UpdateType: Mutable
.PARAMETER VpcConfig
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-vpcconfig
Required: False
Type: VpcConfig
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.Lambda.Function')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
$Code,
[parameter(Mandatory = $false)]
$DeadLetterConfig,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Description,
[parameter(Mandatory = $false)]
$Environment,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$FunctionName,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Handler,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$KmsKeyArn,
[parameter(Mandatory = $false)]
[Int]
$MemorySize,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Role,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Runtime,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.Tag"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Tags,
[parameter(Mandatory = $false)]
[Int]
$Timeout,
[parameter(Mandatory = $false)]
$TracingConfig,
[parameter(Mandatory = $false)]
$VpcConfig,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::Lambda::Function"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.Lambda.Function'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSWAFRule.ps1
|
New-VSWAFRule.ps1
|
function New-VSWAFRule {
<#
.SYNOPSIS
Adds an AWS::WAF::Rule resource to the template
.DESCRIPTION
Adds an AWS::WAF::Rule resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-rule.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER MetricName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-rule.html#cfn-waf-rule-metricname
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER Name
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-rule.html#cfn-waf-rule-name
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER Predicates
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-rule.html#cfn-waf-rule-predicates
DuplicatesAllowed: False
ItemType: Predicate
Required: False
Type: List
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.WAF.Rule')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$MetricName,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Name,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.WAF.Rule.Predicate"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Predicates,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::WAF::Rule"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.WAF.Rule'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSECSTaskDefinition.ps1
|
New-VSECSTaskDefinition.ps1
|
function New-VSECSTaskDefinition {
<#
.SYNOPSIS
Adds an AWS::ECS::TaskDefinition resource to the template
.DESCRIPTION
Adds an AWS::ECS::TaskDefinition resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER ContainerDefinitions
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html#cfn-ecs-taskdefinition-containerdefinitions
DuplicatesAllowed: False
ItemType: ContainerDefinition
Required: False
Type: List
UpdateType: Immutable
.PARAMETER Family
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html#cfn-ecs-taskdefinition-family
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER NetworkMode
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html#cfn-ecs-taskdefinition-networkmode
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER PlacementConstraints
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html#cfn-ecs-taskdefinition-placementconstraints
DuplicatesAllowed: False
ItemType: TaskDefinitionPlacementConstraint
Required: False
Type: List
UpdateType: Immutable
.PARAMETER TaskRoleArn
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html#cfn-ecs-taskdefinition-taskrolearn
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER Volumes
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html#cfn-ecs-taskdefinition-volumes
DuplicatesAllowed: False
ItemType: Volume
Required: False
Type: List
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.ECS.TaskDefinition')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.ECS.TaskDefinition.ContainerDefinition"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ContainerDefinitions,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Family,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$NetworkMode,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.ECS.TaskDefinition.TaskDefinitionPlacementConstraint"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$PlacementConstraints,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$TaskRoleArn,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.ECS.TaskDefinition.Volume"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Volumes,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::ECS::TaskDefinition"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.ECS.TaskDefinition'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSIoTThingPrincipalAttachment.ps1
|
New-VSIoTThingPrincipalAttachment.ps1
|
function New-VSIoTThingPrincipalAttachment {
<#
.SYNOPSIS
Adds an AWS::IoT::ThingPrincipalAttachment resource to the template
.DESCRIPTION
Adds an AWS::IoT::ThingPrincipalAttachment resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-thingprincipalattachment.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER Principal
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-thingprincipalattachment.html#cfn-iot-thingprincipalattachment-principal
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER ThingName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-thingprincipalattachment.html#cfn-iot-thingprincipalattachment-thingname
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.IoT.ThingPrincipalAttachment')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Principal,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ThingName,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::IoT::ThingPrincipalAttachment"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.IoT.ThingPrincipalAttachment'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSLogsSubscriptionFilter.ps1
|
New-VSLogsSubscriptionFilter.ps1
|
function New-VSLogsSubscriptionFilter {
<#
.SYNOPSIS
Adds an AWS::Logs::SubscriptionFilter resource to the template
.DESCRIPTION
Adds an AWS::Logs::SubscriptionFilter resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-subscriptionfilter.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER DestinationArn
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-subscriptionfilter.html#cfn-cwl-subscriptionfilter-destinationarn
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER FilterPattern
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-subscriptionfilter.html#cfn-cwl-subscriptionfilter-filterpattern
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER LogGroupName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-subscriptionfilter.html#cfn-cwl-subscriptionfilter-loggroupname
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER RoleArn
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-subscriptionfilter.html#cfn-cwl-subscriptionfilter-rolearn
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.Logs.SubscriptionFilter')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$DestinationArn,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$FilterPattern,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$LogGroupName,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$RoleArn,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::Logs::SubscriptionFilter"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.Logs.SubscriptionFilter'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSLogsDestination.ps1
|
New-VSLogsDestination.ps1
|
function New-VSLogsDestination {
<#
.SYNOPSIS
Adds an AWS::Logs::Destination resource to the template
.DESCRIPTION
Adds an AWS::Logs::Destination resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-destination.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER DestinationName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-destination.html#cfn-logs-destination-destinationname
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER DestinationPolicy
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-destination.html#cfn-logs-destination-destinationpolicy
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER RoleArn
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-destination.html#cfn-logs-destination-rolearn
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER TargetArn
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-destination.html#cfn-logs-destination-targetarn
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.Logs.Destination')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$DestinationName,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$DestinationPolicy,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$RoleArn,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$TargetArn,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::Logs::Destination"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.Logs.Destination'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSEC2InternetGateway.ps1
|
New-VSEC2InternetGateway.ps1
|
function New-VSEC2InternetGateway {
<#
.SYNOPSIS
Adds an AWS::EC2::InternetGateway resource to the template
.DESCRIPTION
Adds an AWS::EC2::InternetGateway resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-internet-gateway.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER Tags
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-internet-gateway.html#cfn-ec2-internetgateway-tags
DuplicatesAllowed: True
ItemType: Tag
Required: False
Type: List
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.EC2.InternetGateway')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.Tag"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Tags,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::EC2::InternetGateway"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.EC2.InternetGateway'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSEC2NatGateway.ps1
|
New-VSEC2NatGateway.ps1
|
function New-VSEC2NatGateway {
<#
.SYNOPSIS
Adds an AWS::EC2::NatGateway resource to the template
.DESCRIPTION
Adds an AWS::EC2::NatGateway resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-natgateway.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER AllocationId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-natgateway.html#cfn-ec2-natgateway-allocationid
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER SubnetId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-natgateway.html#cfn-ec2-natgateway-subnetid
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.EC2.NatGateway')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$AllocationId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$SubnetId,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::EC2::NatGateway"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.EC2.NatGateway'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSElastiCacheSubnetGroup.ps1
|
New-VSElastiCacheSubnetGroup.ps1
|
function New-VSElastiCacheSubnetGroup {
<#
.SYNOPSIS
Adds an AWS::ElastiCache::SubnetGroup resource to the template
.DESCRIPTION
Adds an AWS::ElastiCache::SubnetGroup resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-subnetgroup.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER CacheSubnetGroupName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-subnetgroup.html#cfn-elasticache-subnetgroup-cachesubnetgroupname
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER Description
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-subnetgroup.html#cfn-elasticache-subnetgroup-description
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER SubnetIds
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-subnetgroup.html#cfn-elasticache-subnetgroup-subnetids
DuplicatesAllowed: True
PrimitiveItemType: String
Required: True
Type: List
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.ElastiCache.SubnetGroup')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$CacheSubnetGroupName,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Description,
[parameter(Mandatory = $true)]
$SubnetIds,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::ElastiCache::SubnetGroup"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.ElastiCache.SubnetGroup'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSWAFRegionalRule.ps1
|
New-VSWAFRegionalRule.ps1
|
function New-VSWAFRegionalRule {
<#
.SYNOPSIS
Adds an AWS::WAFRegional::Rule resource to the template
.DESCRIPTION
Adds an AWS::WAFRegional::Rule resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-rule.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER MetricName
Required: True
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-rule.html#cfn-wafregional-rule-metricname
PrimitiveType: String
UpdateType: Immutable
.PARAMETER Predicates
Type: List
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-rule.html#cfn-wafregional-rule-predicates
ItemType: Predicate
UpdateType: Mutable
.PARAMETER Name
Required: True
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-rule.html#cfn-wafregional-rule-name
PrimitiveType: String
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.WAFRegional.Rule')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$MetricName,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.WAFRegional.Rule.Predicate"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Predicates,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Name,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::WAFRegional::Rule"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.WAFRegional.Rule'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSRedshiftClusterSecurityGroupIngress.ps1
|
New-VSRedshiftClusterSecurityGroupIngress.ps1
|
function New-VSRedshiftClusterSecurityGroupIngress {
<#
.SYNOPSIS
Adds an AWS::Redshift::ClusterSecurityGroupIngress resource to the template
.DESCRIPTION
Adds an AWS::Redshift::ClusterSecurityGroupIngress resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-clustersecuritygroupingress.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER CIDRIP
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-clustersecuritygroupingress.html#cfn-redshift-clustersecuritygroupingress-cidrip
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER ClusterSecurityGroupName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-clustersecuritygroupingress.html#cfn-redshift-clustersecuritygroupingress-clustersecuritygroupname
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER EC2SecurityGroupName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-clustersecuritygroupingress.html#cfn-redshift-clustersecuritygroupingress-ec2securitygroupname
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER EC2SecurityGroupOwnerId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-clustersecuritygroupingress.html#cfn-redshift-clustersecuritygroupingress-ec2securitygroupownerid
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.Redshift.ClusterSecurityGroupIngress')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$CIDRIP,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ClusterSecurityGroupName,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$EC2SecurityGroupName,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$EC2SecurityGroupOwnerId,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::Redshift::ClusterSecurityGroupIngress"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.Redshift.ClusterSecurityGroupIngress'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSEC2VPCCidrBlock.ps1
|
New-VSEC2VPCCidrBlock.ps1
|
function New-VSEC2VPCCidrBlock {
<#
.SYNOPSIS
Adds an AWS::EC2::VPCCidrBlock resource to the template
.DESCRIPTION
Adds an AWS::EC2::VPCCidrBlock resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpccidrblock.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER AmazonProvidedIpv6CidrBlock
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpccidrblock.html#cfn-ec2-vpccidrblock-amazonprovidedipv6cidrblock
PrimitiveType: Boolean
Required: False
UpdateType: Immutable
.PARAMETER VpcId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpccidrblock.html#cfn-ec2-vpccidrblock-vpcid
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.EC2.VPCCidrBlock')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[System.Boolean]
$AmazonProvidedIpv6CidrBlock,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$VpcId,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::EC2::VPCCidrBlock"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.EC2.VPCCidrBlock'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSEC2Volume.ps1
|
New-VSEC2Volume.ps1
|
function New-VSEC2Volume {
<#
.SYNOPSIS
Adds an AWS::EC2::Volume resource to the template
.DESCRIPTION
Adds an AWS::EC2::Volume resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER AutoEnableIO
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-autoenableio
PrimitiveType: Boolean
Required: False
UpdateType: Mutable
.PARAMETER AvailabilityZone
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-availabilityzone
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER Encrypted
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-encrypted
PrimitiveType: Boolean
Required: False
UpdateType: Mutable
.PARAMETER Iops
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-iops
PrimitiveType: Integer
Required: False
UpdateType: Mutable
.PARAMETER KmsKeyId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-kmskeyid
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER Size
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-size
PrimitiveType: Integer
Required: False
UpdateType: Mutable
.PARAMETER SnapshotId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-snapshotid
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER Tags
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-tags
DuplicatesAllowed: True
ItemType: Tag
Required: False
Type: List
UpdateType: Mutable
.PARAMETER VolumeType
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-volumetype
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.EC2.Volume')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[System.Boolean]
$AutoEnableIO,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$AvailabilityZone,
[parameter(Mandatory = $false)]
[System.Boolean]
$Encrypted,
[parameter(Mandatory = $false)]
[Int]
$Iops,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$KmsKeyId,
[parameter(Mandatory = $false)]
[Int]
$Size,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$SnapshotId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.Tag"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Tags,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$VolumeType,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::EC2::Volume"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.EC2.Volume'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSApiGatewayBasePathMapping.ps1
|
New-VSApiGatewayBasePathMapping.ps1
|
function New-VSApiGatewayBasePathMapping {
<#
.SYNOPSIS
Adds an AWS::ApiGateway::BasePathMapping resource to the template
.DESCRIPTION
Adds an AWS::ApiGateway::BasePathMapping resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-basepathmapping.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER BasePath
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-basepathmapping.html#cfn-apigateway-basepathmapping-basepath
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER DomainName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-basepathmapping.html#cfn-apigateway-basepathmapping-domainname
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER RestApiId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-basepathmapping.html#cfn-apigateway-basepathmapping-restapiid
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER Stage
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-basepathmapping.html#cfn-apigateway-basepathmapping-stage
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.ApiGateway.BasePathMapping')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$BasePath,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$DomainName,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$RestApiId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Stage,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::ApiGateway::BasePathMapping"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.ApiGateway.BasePathMapping'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSGameLiftBuild.ps1
|
New-VSGameLiftBuild.ps1
|
function New-VSGameLiftBuild {
<#
.SYNOPSIS
Adds an AWS::GameLift::Build resource to the template
.DESCRIPTION
Adds an AWS::GameLift::Build resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-build.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER Name
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-build.html#cfn-gamelift-build-name
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER StorageLocation
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-build.html#cfn-gamelift-build-storagelocation
Required: False
Type: S3Location
UpdateType: Immutable
.PARAMETER Version
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-build.html#cfn-gamelift-build-version
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.GameLift.Build')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Name,
[parameter(Mandatory = $false)]
$StorageLocation,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Version,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::GameLift::Build"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.GameLift.Build'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSElastiCacheParameterGroup.ps1
|
New-VSElastiCacheParameterGroup.ps1
|
function New-VSElastiCacheParameterGroup {
<#
.SYNOPSIS
Adds an AWS::ElastiCache::ParameterGroup resource to the template
.DESCRIPTION
Adds an AWS::ElastiCache::ParameterGroup resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-parameter-group.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER CacheParameterGroupFamily
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-parameter-group.html#cfn-elasticache-parametergroup-cacheparametergroupfamily
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER Description
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-parameter-group.html#cfn-elasticache-parametergroup-description
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER Properties
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-parameter-group.html#cfn-elasticache-parametergroup-properties
DuplicatesAllowed: False
PrimitiveItemType: String
Required: False
Type: Map
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.ElastiCache.ParameterGroup')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$CacheParameterGroupFamily,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Description,
[parameter(Mandatory = $false)]
[System.Collections.Hashtable]
$Properties,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::ElastiCache::ParameterGroup"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.ElastiCache.ParameterGroup'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSCognitoIdentityPool.ps1
|
New-VSCognitoIdentityPool.ps1
|
function New-VSCognitoIdentityPool {
<#
.SYNOPSIS
Adds an AWS::Cognito::IdentityPool resource to the template
.DESCRIPTION
Adds an AWS::Cognito::IdentityPool resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-identitypool.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER PushSync
Type: PushSync
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-identitypool.html#cfn-cognito-identitypool-pushsync
UpdateType: Mutable
.PARAMETER CognitoIdentityProviders
Type: List
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-identitypool.html#cfn-cognito-identitypool-cognitoidentityproviders
ItemType: CognitoIdentityProvider
UpdateType: Mutable
.PARAMETER CognitoEvents
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-identitypool.html#cfn-cognito-identitypool-cognitoevents
PrimitiveType: Json
UpdateType: Mutable
.PARAMETER DeveloperProviderName
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-identitypool.html#cfn-cognito-identitypool-developerprovidername
PrimitiveType: String
UpdateType: Mutable
.PARAMETER CognitoStreams
Type: CognitoStreams
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-identitypool.html#cfn-cognito-identitypool-cognitostreams
UpdateType: Mutable
.PARAMETER IdentityPoolName
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-identitypool.html#cfn-cognito-identitypool-identitypoolname
PrimitiveType: String
UpdateType: Mutable
.PARAMETER AllowUnauthenticatedIdentities
Required: True
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-identitypool.html#cfn-cognito-identitypool-allowunauthenticatedidentities
PrimitiveType: Boolean
UpdateType: Mutable
.PARAMETER SupportedLoginProviders
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-identitypool.html#cfn-cognito-identitypool-supportedloginproviders
PrimitiveType: Json
UpdateType: Mutable
.PARAMETER SamlProviderARNs
PrimitiveItemType: String
Type: List
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-identitypool.html#cfn-cognito-identitypool-samlproviderarns
UpdateType: Mutable
.PARAMETER OpenIdConnectProviderARNs
PrimitiveItemType: String
Type: List
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-identitypool.html#cfn-cognito-identitypool-openidconnectproviderarns
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.Cognito.IdentityPool')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
$PushSync,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.Cognito.IdentityPool.CognitoIdentityProvider"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$CognitoIdentityProviders,
[parameter(Mandatory = $false)]
$CognitoEvents,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$DeveloperProviderName,
[parameter(Mandatory = $false)]
$CognitoStreams,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$IdentityPoolName,
[parameter(Mandatory = $true)]
[System.Boolean]
$AllowUnauthenticatedIdentities,
[parameter(Mandatory = $false)]
$SupportedLoginProviders,
[parameter(Mandatory = $false)]
$SamlProviderARNs,
[parameter(Mandatory = $false)]
$OpenIdConnectProviderARNs,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::Cognito::IdentityPool"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.Cognito.IdentityPool'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSSNSSubscription.ps1
|
New-VSSNSSubscription.ps1
|
function New-VSSNSSubscription {
<#
.SYNOPSIS
Adds an AWS::SNS::Subscription resource to the template
.DESCRIPTION
Adds an AWS::SNS::Subscription resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-subscription.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER Endpoint
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-subscription.html#cfn-sns-endpoint
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER Protocol
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-subscription.html#cfn-sns-protocol
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER TopicArn
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-subscription.html#topicarn
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.SNS.Subscription')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Endpoint,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Protocol,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$TopicArn,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::SNS::Subscription"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.SNS.Subscription'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSConfigDeliveryChannel.ps1
|
New-VSConfigDeliveryChannel.ps1
|
function New-VSConfigDeliveryChannel {
<#
.SYNOPSIS
Adds an AWS::Config::DeliveryChannel resource to the template
.DESCRIPTION
Adds an AWS::Config::DeliveryChannel resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-config-deliverychannel.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER ConfigSnapshotDeliveryProperties
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-config-deliverychannel.html#cfn-config-deliverychannel-configsnapshotdeliveryproperties
Required: False
Type: ConfigSnapshotDeliveryProperties
UpdateType: Mutable
.PARAMETER Name
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-config-deliverychannel.html#cfn-config-deliverychannel-name
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER S3BucketName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-config-deliverychannel.html#cfn-config-deliverychannel-s3bucketname
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER S3KeyPrefix
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-config-deliverychannel.html#cfn-config-deliverychannel-s3keyprefix
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER SnsTopicARN
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-config-deliverychannel.html#cfn-config-deliverychannel-snstopicarn
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.Config.DeliveryChannel')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
$ConfigSnapshotDeliveryProperties,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Name,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$S3BucketName,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$S3KeyPrefix,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$SnsTopicARN,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::Config::DeliveryChannel"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.Config.DeliveryChannel'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSAutoScalingAutoScalingGroup.ps1
|
New-VSAutoScalingAutoScalingGroup.ps1
|
function New-VSAutoScalingAutoScalingGroup {
<#
.SYNOPSIS
Adds an AWS::AutoScaling::AutoScalingGroup resource to the template
.DESCRIPTION
Adds an AWS::AutoScaling::AutoScalingGroup resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER AvailabilityZones
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-availabilityzones
DuplicatesAllowed: True
PrimitiveItemType: String
Required: False
Type: List
UpdateType: Mutable
.PARAMETER Cooldown
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-cooldown
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER DesiredCapacity
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-desiredcapacity
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER HealthCheckGracePeriod
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-healthcheckgraceperiod
PrimitiveType: Integer
Required: False
UpdateType: Mutable
.PARAMETER HealthCheckType
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-healthchecktype
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER InstanceId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-instanceid
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER LaunchConfigurationName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-launchconfigurationname
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER LoadBalancerNames
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-loadbalancernames
DuplicatesAllowed: True
PrimitiveItemType: String
Required: False
Type: List
UpdateType: Mutable
.PARAMETER MaxSize
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-maxsize
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER MetricsCollection
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-metricscollection
Required: False
Type: MetricsCollection
UpdateType: Mutable
.PARAMETER MinSize
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-minsize
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER NotificationConfigurations
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-notificationconfigurations
Required: False
Type: NotificationConfigurations
UpdateType: Mutable
.PARAMETER PlacementGroup
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-placementgroup
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER Tags
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-tags
DuplicatesAllowed: True
ItemType: TagProperty
Required: False
Type: List
UpdateType: Mutable
.PARAMETER TargetGroupARNs
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-targetgrouparns
DuplicatesAllowed: False
PrimitiveItemType: String
Required: False
Type: List
UpdateType: Mutable
.PARAMETER TerminationPolicies
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-termpolicy
DuplicatesAllowed: False
PrimitiveItemType: String
Required: False
Type: List
UpdateType: Mutable
.PARAMETER VPCZoneIdentifier
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-vpczoneidentifier
DuplicatesAllowed: True
PrimitiveItemType: String
Required: False
Type: List
UpdateType: Mutable
.PARAMETER CreationPolicy
Use the CreationPolicy attribute when you want to wait on resource configuration actions before stack creation proceeds. For example, if you install and configure software applications on an EC2 instance, you might want those applications to be running before proceeding. In such cases, you can add a CreationPolicy attribute to the instance, and then send a success signal to the instance after the applications are installed and configured.
You must use the "Add-CreationPolicy" function here.
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.AutoScaling.AutoScalingGroup')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
$AvailabilityZones,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Cooldown,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$DesiredCapacity,
[parameter(Mandatory = $false)]
[Int]
$HealthCheckGracePeriod,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$HealthCheckType,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$InstanceId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$LaunchConfigurationName,
[parameter(Mandatory = $false)]
$LoadBalancerNames,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$MaxSize,
[parameter(Mandatory = $false)]
$MetricsCollection,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$MinSize,
[parameter(Mandatory = $false)]
$NotificationConfigurations,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$PlacementGroup,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.AutoScaling.AutoScalingGroup.TagProperty"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Tags,
[parameter(Mandatory = $false)]
$TargetGroupARNs,
[parameter(Mandatory = $false)]
$TerminationPolicies,
[parameter(Mandatory = $false)]
$VPCZoneIdentifier,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.CreationPolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$CreationPolicy,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::AutoScaling::AutoScalingGroup"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'CreationPolicy' {
$ResourceParams.Add("CreationPolicy",$CreationPolicy)
}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.AutoScaling.AutoScalingGroup'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSIAMGroup.ps1
|
New-VSIAMGroup.ps1
|
function New-VSIAMGroup {
<#
.SYNOPSIS
Adds an AWS::IAM::Group resource to the template
.DESCRIPTION
Adds an AWS::IAM::Group resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER GroupName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html#cfn-iam-group-groupname
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER ManagedPolicyArns
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html#cfn-iam-group-managepolicyarns
DuplicatesAllowed: False
PrimitiveItemType: String
Required: False
Type: List
UpdateType: Mutable
.PARAMETER Path
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html#cfn-iam-group-path
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER Policies
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html#cfn-iam-group-policies
DuplicatesAllowed: False
ItemType: Policy
Required: False
Type: List
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.IAM.Group')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$GroupName,
[parameter(Mandatory = $false)]
$ManagedPolicyArns,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Path,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.IAM.Group.Policy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Policies,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::IAM::Group"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.IAM.Group'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSEC2VPCPeeringConnection.ps1
|
New-VSEC2VPCPeeringConnection.ps1
|
function New-VSEC2VPCPeeringConnection {
<#
.SYNOPSIS
Adds an AWS::EC2::VPCPeeringConnection resource to the template
.DESCRIPTION
Adds an AWS::EC2::VPCPeeringConnection resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcpeeringconnection.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER PeerOwnerId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcpeeringconnection.html#cfn-ec2-vpcpeeringconnection-peerownerid
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER PeerRoleArn
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcpeeringconnection.html#cfn-ec2-vpcpeeringconnection-peerrolearn
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER PeerVpcId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcpeeringconnection.html#cfn-ec2-vpcpeeringconnection-peervpcid
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER Tags
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcpeeringconnection.html#cfn-ec2-vpcpeeringconnection-tags
DuplicatesAllowed: True
ItemType: Tag
Required: False
Type: List
UpdateType: Mutable
.PARAMETER VpcId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcpeeringconnection.html#cfn-ec2-vpcpeeringconnection-vpcid
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.EC2.VPCPeeringConnection')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$PeerOwnerId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$PeerRoleArn,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$PeerVpcId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.Tag"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Tags,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$VpcId,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::EC2::VPCPeeringConnection"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.EC2.VPCPeeringConnection'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSIAMRole.ps1
|
New-VSIAMRole.ps1
|
function New-VSIAMRole {
<#
.SYNOPSIS
Adds an AWS::IAM::Role resource to the template
.DESCRIPTION
Adds an AWS::IAM::Role resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER AssumeRolePolicyDocument
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-assumerolepolicydocument
PrimitiveType: Json
Required: True
UpdateType: Mutable
.PARAMETER ManagedPolicyArns
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-managepolicyarns
DuplicatesAllowed: False
PrimitiveItemType: String
Required: False
Type: List
UpdateType: Mutable
.PARAMETER Path
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-path
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER Policies
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-policies
DuplicatesAllowed: True
ItemType: Policy
Required: False
Type: List
UpdateType: Mutable
.PARAMETER RoleName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-rolename
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.IAM.Role')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
$AssumeRolePolicyDocument,
[parameter(Mandatory = $false)]
$ManagedPolicyArns,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Path,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.IAM.Role.Policy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Policies,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$RoleName,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::IAM::Role"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.IAM.Role'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSECSCluster.ps1
|
New-VSECSCluster.ps1
|
function New-VSECSCluster {
<#
.SYNOPSIS
Adds an AWS::ECS::Cluster resource to the template
.DESCRIPTION
Adds an AWS::ECS::Cluster resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER ClusterName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-clustername
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.ECS.Cluster')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ClusterName,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::ECS::Cluster"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.ECS.Cluster'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSEC2EIP.ps1
|
New-VSEC2EIP.ps1
|
function New-VSEC2EIP {
<#
.SYNOPSIS
Adds an AWS::EC2::EIP resource to the template
.DESCRIPTION
Adds an AWS::EC2::EIP resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-eip.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER Domain
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-eip.html#cfn-ec2-eip-domain
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER InstanceId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-eip.html#cfn-ec2-eip-instanceid
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.EC2.EIP')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Domain,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$InstanceId,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::EC2::EIP"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.EC2.EIP'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSWAFRegionalXssMatchSet.ps1
|
New-VSWAFRegionalXssMatchSet.ps1
|
function New-VSWAFRegionalXssMatchSet {
<#
.SYNOPSIS
Adds an AWS::WAFRegional::XssMatchSet resource to the template
.DESCRIPTION
Adds an AWS::WAFRegional::XssMatchSet resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-xssmatchset.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER XssMatchTuples
Type: List
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-xssmatchset.html#cfn-wafregional-xssmatchset-xssmatchtuples
ItemType: XssMatchTuple
UpdateType: Mutable
.PARAMETER Name
Required: True
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-xssmatchset.html#cfn-wafregional-xssmatchset-name
PrimitiveType: String
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.WAFRegional.XssMatchSet')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.WAFRegional.XssMatchSet.XssMatchTuple"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$XssMatchTuples,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Name,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::WAFRegional::XssMatchSet"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.WAFRegional.XssMatchSet'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSWAFIPSet.ps1
|
New-VSWAFIPSet.ps1
|
function New-VSWAFIPSet {
<#
.SYNOPSIS
Adds an AWS::WAF::IPSet resource to the template
.DESCRIPTION
Adds an AWS::WAF::IPSet resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-ipset.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER IPSetDescriptors
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-ipset.html#cfn-waf-ipset-ipsetdescriptors
DuplicatesAllowed: False
ItemType: IPSetDescriptor
Required: False
Type: List
UpdateType: Mutable
.PARAMETER Name
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-ipset.html#cfn-waf-ipset-name
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.WAF.IPSet')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.WAF.IPSet.IPSetDescriptor"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$IPSetDescriptors,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Name,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::WAF::IPSet"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.WAF.IPSet'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSEC2SubnetCidrBlock.ps1
|
New-VSEC2SubnetCidrBlock.ps1
|
function New-VSEC2SubnetCidrBlock {
<#
.SYNOPSIS
Adds an AWS::EC2::SubnetCidrBlock resource to the template
.DESCRIPTION
Adds an AWS::EC2::SubnetCidrBlock resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnetcidrblock.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER Ipv6CidrBlock
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnetcidrblock.html#cfn-ec2-subnetcidrblock-ipv6cidrblock
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER SubnetId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnetcidrblock.html#cfn-ec2-subnetcidrblock-subnetid
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.EC2.SubnetCidrBlock')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Ipv6CidrBlock,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$SubnetId,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::EC2::SubnetCidrBlock"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.EC2.SubnetCidrBlock'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSElasticBeanstalkApplicationVersion.ps1
|
New-VSElasticBeanstalkApplicationVersion.ps1
|
function New-VSElasticBeanstalkApplicationVersion {
<#
.SYNOPSIS
Adds an AWS::ElasticBeanstalk::ApplicationVersion resource to the template
.DESCRIPTION
Adds an AWS::ElasticBeanstalk::ApplicationVersion resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-beanstalk-version.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER ApplicationName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-beanstalk-version.html#cfn-elasticbeanstalk-applicationversion-applicationname
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER Description
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-beanstalk-version.html#cfn-elasticbeanstalk-applicationversion-description
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER SourceBundle
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-beanstalk-version.html#cfn-elasticbeanstalk-applicationversion-sourcebundle
Required: True
Type: SourceBundle
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.ElasticBeanstalk.ApplicationVersion')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ApplicationName,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Description,
[parameter(Mandatory = $true)]
$SourceBundle,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::ElasticBeanstalk::ApplicationVersion"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.ElasticBeanstalk.ApplicationVersion'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSEC2DHCPOptions.ps1
|
New-VSEC2DHCPOptions.ps1
|
function New-VSEC2DHCPOptions {
<#
.SYNOPSIS
Adds an AWS::EC2::DHCPOptions resource to the template
.DESCRIPTION
Adds an AWS::EC2::DHCPOptions resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-dhcp-options.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER DomainName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-dhcp-options.html#cfn-ec2-dhcpoptions-domainname
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER DomainNameServers
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-dhcp-options.html#cfn-ec2-dhcpoptions-domainnameservers
DuplicatesAllowed: False
PrimitiveItemType: String
Required: False
Type: List
UpdateType: Immutable
.PARAMETER NetbiosNameServers
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-dhcp-options.html#cfn-ec2-dhcpoptions-netbiosnameservers
DuplicatesAllowed: False
PrimitiveItemType: String
Required: False
Type: List
UpdateType: Immutable
.PARAMETER NetbiosNodeType
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-dhcp-options.html#cfn-ec2-dhcpoptions-netbiosnodetype
PrimitiveType: Integer
Required: False
UpdateType: Immutable
.PARAMETER NtpServers
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-dhcp-options.html#cfn-ec2-dhcpoptions-ntpservers
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER Tags
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-dhcp-options.html#cfn-ec2-dhcpoptions-tags
DuplicatesAllowed: True
ItemType: Tag
Required: False
Type: List
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.EC2.DHCPOptions')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$DomainName,
[parameter(Mandatory = $false)]
$DomainNameServers,
[parameter(Mandatory = $false)]
$NetbiosNameServers,
[parameter(Mandatory = $false)]
[Int]
$NetbiosNodeType,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$NtpServers,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.Tag"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Tags,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::EC2::DHCPOptions"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.EC2.DHCPOptions'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSLambdaPermission.ps1
|
New-VSLambdaPermission.ps1
|
function New-VSLambdaPermission {
<#
.SYNOPSIS
Adds an AWS::Lambda::Permission resource to the template
.DESCRIPTION
Adds an AWS::Lambda::Permission resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER Action
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html#cfn-lambda-permission-action
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER FunctionName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html#cfn-lambda-permission-functionname
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER Principal
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html#cfn-lambda-permission-principal
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER SourceAccount
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html#cfn-lambda-permission-sourceaccount
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER SourceArn
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html#cfn-lambda-permission-sourcearn
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.Lambda.Permission')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Action,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$FunctionName,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Principal,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$SourceAccount,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$SourceArn,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::Lambda::Permission"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.Lambda.Permission'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSWAFRegionalIPSet.ps1
|
New-VSWAFRegionalIPSet.ps1
|
function New-VSWAFRegionalIPSet {
<#
.SYNOPSIS
Adds an AWS::WAFRegional::IPSet resource to the template
.DESCRIPTION
Adds an AWS::WAFRegional::IPSet resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-ipset.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER IPSetDescriptors
Type: List
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-ipset.html#cfn-wafregional-ipset-ipsetdescriptors
ItemType: IPSetDescriptor
UpdateType: Mutable
.PARAMETER Name
Required: True
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-ipset.html#cfn-wafregional-ipset-name
PrimitiveType: String
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.WAFRegional.IPSet')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.WAFRegional.IPSet.IPSetDescriptor"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$IPSetDescriptors,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Name,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::WAFRegional::IPSet"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.WAFRegional.IPSet'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSWAFByteMatchSet.ps1
|
New-VSWAFByteMatchSet.ps1
|
function New-VSWAFByteMatchSet {
<#
.SYNOPSIS
Adds an AWS::WAF::ByteMatchSet resource to the template
.DESCRIPTION
Adds an AWS::WAF::ByteMatchSet resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-bytematchset.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER ByteMatchTuples
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-bytematchset.html#cfn-waf-bytematchset-bytematchtuples
DuplicatesAllowed: False
ItemType: ByteMatchTuple
Required: False
Type: List
UpdateType: Mutable
.PARAMETER Name
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-bytematchset.html#cfn-waf-bytematchset-name
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.WAF.ByteMatchSet')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.WAF.ByteMatchSet.ByteMatchTuple"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ByteMatchTuples,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Name,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::WAF::ByteMatchSet"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.WAF.ByteMatchSet'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSRDSDBParameterGroup.ps1
|
New-VSRDSDBParameterGroup.ps1
|
function New-VSRDSDBParameterGroup {
<#
.SYNOPSIS
Adds an AWS::RDS::DBParameterGroup resource to the template
.DESCRIPTION
Adds an AWS::RDS::DBParameterGroup resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbparametergroup.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER Description
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbparametergroup.html#cfn-rds-dbparametergroup-description
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER Family
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbparametergroup.html#cfn-rds-dbparametergroup-family
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER Parameters
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbparametergroup.html#cfn-rds-dbparametergroup-parameters
DuplicatesAllowed: False
PrimitiveItemType: String
Required: False
Type: Map
UpdateType: Mutable
.PARAMETER Tags
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbparametergroup.html#cfn-rds-dbparametergroup-tags
DuplicatesAllowed: True
ItemType: Tag
Required: False
Type: List
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.RDS.DBParameterGroup')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Description,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Family,
[parameter(Mandatory = $false)]
[System.Collections.Hashtable]
$Parameters,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.Tag"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Tags,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::RDS::DBParameterGroup"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.RDS.DBParameterGroup'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSRoute53HealthCheck.ps1
|
New-VSRoute53HealthCheck.ps1
|
function New-VSRoute53HealthCheck {
<#
.SYNOPSIS
Adds an AWS::Route53::HealthCheck resource to the template
.DESCRIPTION
Adds an AWS::Route53::HealthCheck resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-healthcheck.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER HealthCheckConfig
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-healthcheck.html#cfn-route53-healthcheck-healthcheckconfig
Required: True
Type: HealthCheckConfig
UpdateType: Mutable
.PARAMETER HealthCheckTags
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-healthcheck.html#cfn-route53-healthcheck-healthchecktags
DuplicatesAllowed: True
ItemType: HealthCheckTag
Required: False
Type: List
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.Route53.HealthCheck')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $true)]
$HealthCheckConfig,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.Route53.HealthCheck.HealthCheckTag"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$HealthCheckTags,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::Route53::HealthCheck"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.Route53.HealthCheck'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Types/New-VSRDSDBCluster.ps1
|
New-VSRDSDBCluster.ps1
|
function New-VSRDSDBCluster {
<#
.SYNOPSIS
Adds an AWS::RDS::DBCluster resource to the template
.DESCRIPTION
Adds an AWS::RDS::DBCluster resource to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html
.PARAMETER LogicalId
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
.PARAMETER AvailabilityZones
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-availabilityzones
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER BackupRetentionPeriod
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-backuprententionperiod
PrimitiveType: Integer
Required: False
UpdateType: Mutable
.PARAMETER DBClusterParameterGroupName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-dbclusterparametergroupname
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER DBSubnetGroupName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-dbsubnetgroupname
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER DatabaseName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-databasename
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER Engine
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-engine
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER EngineVersion
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-engineversion
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER KmsKeyId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-kmskeyid
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER MasterUserPassword
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-masteruserpassword
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER MasterUsername
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-masterusername
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER Port
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-port
PrimitiveType: Integer
Required: False
UpdateType: Mutable
.PARAMETER PreferredBackupWindow
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-preferredbackupwindow
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER PreferredMaintenanceWindow
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-preferredmaintenancewindow
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER SnapshotIdentifier
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-snapshotidentifier
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER StorageEncrypted
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-storageencrypted
PrimitiveType: Boolean
Required: False
UpdateType: Immutable
.PARAMETER Tags
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-tags
DuplicatesAllowed: True
ItemType: Tag
Required: False
Type: List
UpdateType: Mutable
.PARAMETER VpcSecurityGroupIds
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-vpcsecuritygroupids
DuplicatesAllowed: False
PrimitiveItemType: String
Required: False
Type: List
UpdateType: Mutable
.PARAMETER DeletionPolicy
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.
To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
You must use one of the following options: "Delete","Retain","Snapshot"
.PARAMETER DependsOn
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created.
.PARAMETER Metadata
The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values.
You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI.
.PARAMETER UpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
You must use the "Add-UpdatePolicy" function here.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.RDS.DBCluster')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true,Position = 0)]
[ValidateScript( {
if ($_ -match "^[a-zA-Z0-9]*$") {
$true
}
else {
throw 'The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.'
}
})]
[System.String]
$LogicalId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$AvailabilityZones,
[parameter(Mandatory = $false)]
[Int]
$BackupRetentionPeriod,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$DBClusterParameterGroupName,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$DBSubnetGroupName,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$DatabaseName,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Engine,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$EngineVersion,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$KmsKeyId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$MasterUserPassword,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$MasterUsername,
[parameter(Mandatory = $false)]
[Int]
$Port,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$PreferredBackupWindow,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$PreferredMaintenanceWindow,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$SnapshotIdentifier,
[parameter(Mandatory = $false)]
[System.Boolean]
$StorageEncrypted,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.Tag"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Tags,
[parameter(Mandatory = $false)]
$VpcSecurityGroupIds,
[ValidateSet("Delete","Retain","Snapshot")]
[System.String]
$DeletionPolicy,
[parameter(Mandatory = $false)]
[System.String[]]
$DependsOn,
[parameter(Mandatory = $false)]
[System.Management.Automation.PSCustomObject]
$Metadata,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.UpdatePolicy"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$UpdatePolicy,
[parameter(Mandatory = $false)]
$Condition
)
Begin {
$ResourceParams = @{
LogicalId = $LogicalId
Type = "AWS::RDS::DBCluster"
}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
switch ($key) {
'LogicalId' {}
'DeletionPolicy' {
$ResourceParams.Add("DeletionPolicy",$DeletionPolicy)
}
'DependsOn' {
$ResourceParams.Add("DependsOn",$DependsOn)
}
'Metadata' {
$ResourceParams.Add("Metadata",$Metadata)
}
'UpdatePolicy' {
$ResourceParams.Add("UpdatePolicy",$UpdatePolicy)
}
'Condition' {
$ResourceParams.Add("Condition",$Condition)
}
Default {
if (!($ResourceParams["Properties"])) {
$ResourceParams.Add("Properties",([PSCustomObject]@{}))
}
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$ResourceParams["Properties"] | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
}
}
End {
$obj = New-VaporResource @ResourceParams
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.RDS.DBCluster'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Property Types/Add-VSEMRClusterScriptBootstrapActionConfig.ps1
|
Add-VSEMRClusterScriptBootstrapActionConfig.ps1
|
function Add-VSEMRClusterScriptBootstrapActionConfig {
<#
.SYNOPSIS
Adds an AWS::EMR::Cluster.ScriptBootstrapActionConfig resource property to the template
.DESCRIPTION
Adds an AWS::EMR::Cluster.ScriptBootstrapActionConfig resource property to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-bootstrapactionconfig-scriptbootstrapactionconfig.html
.PARAMETER Args
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-bootstrapactionconfig-scriptbootstrapactionconfig.html#cfn-emr-cluster-bootstrapactionconfig-scriptbootstrapaction-args
DuplicatesAllowed: False
PrimitiveItemType: String
Required: False
Type: List
UpdateType: Mutable
.PARAMETER Path
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-bootstrapactionconfig-scriptbootstrapactionconfig.html#cfn-emr-cluster-bootstrapactionconfig-scriptbootstrapaction-path
PrimitiveType: String
Required: True
UpdateType: Mutable
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.EMR.Cluster.ScriptBootstrapActionConfig')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $false)]
$Args,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Path
)
Begin {
$obj = [PSCustomObject]@{}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
End {
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.EMR.Cluster.ScriptBootstrapActionConfig'
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Property Types/Add-VSRDSOptionGroupOptionSetting.ps1
|
Add-VSRDSOptionGroupOptionSetting.ps1
|
function Add-VSRDSOptionGroupOptionSetting {
<#
.SYNOPSIS
Adds an AWS::RDS::OptionGroup.OptionSetting resource property to the template
.DESCRIPTION
Adds an AWS::RDS::OptionGroup.OptionSetting resource property to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-optiongroup-optionconfigurations-optionsettings.html
.PARAMETER Name
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-optiongroup-optionconfigurations-optionsettings.html#cfn-rds-optiongroup-optionconfigurations-optionsettings-name
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER Value
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-optiongroup-optionconfigurations-optionsettings.html#cfn-rds-optiongroup-optionconfigurations-optionsettings-value
PrimitiveType: String
Required: False
UpdateType: Mutable
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.RDS.OptionGroup.OptionSetting')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Name,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Value
)
Begin {
$obj = [PSCustomObject]@{}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
End {
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.RDS.OptionGroup.OptionSetting'
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Property Types/Add-VSElasticsearchDomainSnapshotOptions.ps1
|
Add-VSElasticsearchDomainSnapshotOptions.ps1
|
function Add-VSElasticsearchDomainSnapshotOptions {
<#
.SYNOPSIS
Adds an AWS::Elasticsearch::Domain.SnapshotOptions resource property to the template
.DESCRIPTION
Adds an AWS::Elasticsearch::Domain.SnapshotOptions resource property to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticsearch-domain-snapshotoptions.html
.PARAMETER AutomatedSnapshotStartHour
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticsearch-domain-snapshotoptions.html#cfn-elasticsearch-domain-snapshotoptions-automatedsnapshotstarthour
PrimitiveType: Integer
Required: False
UpdateType: Mutable
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.Elasticsearch.Domain.SnapshotOptions')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $false)]
[Int]
$AutomatedSnapshotStartHour
)
Begin {
$obj = [PSCustomObject]@{}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
End {
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.Elasticsearch.Domain.SnapshotOptions'
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Property Types/Add-VSWAFRulePredicate.ps1
|
Add-VSWAFRulePredicate.ps1
|
function Add-VSWAFRulePredicate {
<#
.SYNOPSIS
Adds an AWS::WAF::Rule.Predicate resource property to the template
.DESCRIPTION
Adds an AWS::WAF::Rule.Predicate resource property to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-waf-rule-predicates.html
.PARAMETER DataId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-waf-rule-predicates.html#cfn-waf-rule-predicates-dataid
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER Negated
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-waf-rule-predicates.html#cfn-waf-rule-predicates-negated
PrimitiveType: Boolean
Required: True
UpdateType: Mutable
.PARAMETER Type
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-waf-rule-predicates.html#cfn-waf-rule-predicates-type
PrimitiveType: String
Required: True
UpdateType: Mutable
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.WAF.Rule.Predicate')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$DataId,
[parameter(Mandatory = $true)]
[System.Boolean]
$Negated,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Type
)
Begin {
$obj = [PSCustomObject]@{}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
End {
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.WAF.Rule.Predicate'
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Property Types/Add-VSIoTTopicRuleElasticsearchAction.ps1
|
Add-VSIoTTopicRuleElasticsearchAction.ps1
|
function Add-VSIoTTopicRuleElasticsearchAction {
<#
.SYNOPSIS
Adds an AWS::IoT::TopicRule.ElasticsearchAction resource property to the template
.DESCRIPTION
Adds an AWS::IoT::TopicRule.ElasticsearchAction resource property to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-elasticsearch.html
.PARAMETER Endpoint
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-elasticsearch.html#cfn-iot-elasticsearch-endpoint
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER Id
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-elasticsearch.html#cfn-iot-elasticsearch-id
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER Index
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-elasticsearch.html#cfn-iot-elasticsearch-index
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER RoleArn
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-elasticsearch.html#cfn-iot-elasticsearch-rolearn
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER Type
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-elasticsearch.html#cfn-iot-elasticsearch-type
PrimitiveType: String
Required: True
UpdateType: Mutable
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.IoT.TopicRule.ElasticsearchAction')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Endpoint,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Id,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Index,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$RoleArn,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Type
)
Begin {
$obj = [PSCustomObject]@{}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
End {
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.IoT.TopicRule.ElasticsearchAction'
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Property Types/Add-VSDynamoDBTableProvisionedThroughput.ps1
|
Add-VSDynamoDBTableProvisionedThroughput.ps1
|
function Add-VSDynamoDBTableProvisionedThroughput {
<#
.SYNOPSIS
Adds an AWS::DynamoDB::Table.ProvisionedThroughput resource property to the template
.DESCRIPTION
Adds an AWS::DynamoDB::Table.ProvisionedThroughput resource property to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-provisionedthroughput.html
.PARAMETER ReadCapacityUnits
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-provisionedthroughput.html#cfn-dynamodb-provisionedthroughput-readcapacityunits
PrimitiveType: Integer
Required: True
UpdateType: Mutable
.PARAMETER WriteCapacityUnits
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-provisionedthroughput.html#cfn-dynamodb-provisionedthroughput-writecapacityunits
PrimitiveType: Integer
Required: True
UpdateType: Mutable
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.DynamoDB.Table.ProvisionedThroughput')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true)]
[Int]
$ReadCapacityUnits,
[parameter(Mandatory = $true)]
[Int]
$WriteCapacityUnits
)
Begin {
$obj = [PSCustomObject]@{}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
End {
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.DynamoDB.Table.ProvisionedThroughput'
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Property Types/Add-VSIoTTopicRuleSnsAction.ps1
|
Add-VSIoTTopicRuleSnsAction.ps1
|
function Add-VSIoTTopicRuleSnsAction {
<#
.SYNOPSIS
Adds an AWS::IoT::TopicRule.SnsAction resource property to the template
.DESCRIPTION
Adds an AWS::IoT::TopicRule.SnsAction resource property to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-sns.html
.PARAMETER MessageFormat
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-sns.html#cfn-iot-sns-snsaction
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER RoleArn
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-sns.html#cfn-iot-sns-rolearn
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER TargetArn
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-sns.html#cfn-iot-sns-targetarn
PrimitiveType: String
Required: True
UpdateType: Mutable
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.IoT.TopicRule.SnsAction')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$MessageFormat,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$RoleArn,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$TargetArn
)
Begin {
$obj = [PSCustomObject]@{}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
End {
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.IoT.TopicRule.SnsAction'
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Property Types/Add-VSEMRClusterInstanceGroupConfig.ps1
|
Add-VSEMRClusterInstanceGroupConfig.ps1
|
function Add-VSEMRClusterInstanceGroupConfig {
<#
.SYNOPSIS
Adds an AWS::EMR::Cluster.InstanceGroupConfig resource property to the template
.DESCRIPTION
Adds an AWS::EMR::Cluster.InstanceGroupConfig resource property to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig-instancegroupconfig.html
.PARAMETER AutoScalingPolicy
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-autoscalingpolicy
Required: False
Type: AutoScalingPolicy
UpdateType: Mutable
.PARAMETER BidPrice
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig-instancegroupconfig.html#cfn-emr-cluster-jobflowinstancesconfig-instancegroupconfig-bidprice
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER Configurations
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig-instancegroupconfig.html#cfn-emr-cluster-jobflowinstancesconfig-instancegroupconfig-configurations
DuplicatesAllowed: False
ItemType: Configuration
Required: False
Type: List
UpdateType: Immutable
.PARAMETER EbsConfiguration
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig-instancegroupconfig.html#cfn-emr-cluster-jobflowinstancesconfig-instancegroupconfigConfigurations-ebsconfiguration
Required: False
Type: EbsConfiguration
UpdateType: Immutable
.PARAMETER InstanceCount
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig-instancegroupconfig.html#cfn-emr-cluster-jobflowinstancesconfig-instancegroupconfig-instancecount
PrimitiveType: Integer
Required: True
UpdateType: Mutable
.PARAMETER InstanceType
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig-instancegroupconfig.html#cfn-emr-cluster-jobflowinstancesconfig-instancegroupconfig-instancetype
PrimitiveType: String
Required: True
UpdateType: Immutable
.PARAMETER Market
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig-instancegroupconfig.html#cfn-emr-cluster-jobflowinstancesconfig-instancegroupconfig-market
PrimitiveType: String
Required: False
UpdateType: Immutable
.PARAMETER Name
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig-instancegroupconfig.html#cfn-emr-cluster-jobflowinstancesconfig-instancegroupconfig-name
PrimitiveType: String
Required: False
UpdateType: Immutable
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.EMR.Cluster.InstanceGroupConfig')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $false)]
$AutoScalingPolicy,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$BidPrice,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "Vaporshell.Resource.EMR.Cluster.Configuration"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Configurations,
[parameter(Mandatory = $false)]
$EbsConfiguration,
[parameter(Mandatory = $true)]
[Int]
$InstanceCount,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$InstanceType,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Market,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Name
)
Begin {
$obj = [PSCustomObject]@{}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
End {
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.EMR.Cluster.InstanceGroupConfig'
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Property Types/Add-VSDataPipelinePipelineParameterAttribute.ps1
|
Add-VSDataPipelinePipelineParameterAttribute.ps1
|
function Add-VSDataPipelinePipelineParameterAttribute {
<#
.SYNOPSIS
Adds an AWS::DataPipeline::Pipeline.ParameterAttribute resource property to the template
.DESCRIPTION
Adds an AWS::DataPipeline::Pipeline.ParameterAttribute resource property to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-parameterobjects-attributes.html
.PARAMETER Key
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-parameterobjects-attributes.html#cfn-datapipeline-pipeline-parameterobjects-attribtues-key
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER StringValue
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-parameterobjects-attributes.html#cfn-datapipeline-pipeline-parameterobjects-attribtues-stringvalue
PrimitiveType: String
Required: True
UpdateType: Mutable
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.DataPipeline.Pipeline.ParameterAttribute')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Key,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$StringValue
)
Begin {
$obj = [PSCustomObject]@{}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
End {
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.DataPipeline.Pipeline.ParameterAttribute'
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Property Types/Add-VSIoTTopicRuleS3Action.ps1
|
Add-VSIoTTopicRuleS3Action.ps1
|
function Add-VSIoTTopicRuleS3Action {
<#
.SYNOPSIS
Adds an AWS::IoT::TopicRule.S3Action resource property to the template
.DESCRIPTION
Adds an AWS::IoT::TopicRule.S3Action resource property to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-s3.html
.PARAMETER BucketName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-s3.html#cfn-iot-s3-bucketname
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER Key
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-s3.html#cfn-iot-s3-key
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER RoleArn
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-s3.html#cfn-iot-s3-rolearn
PrimitiveType: String
Required: True
UpdateType: Mutable
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.IoT.TopicRule.S3Action')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$BucketName,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Key,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$RoleArn
)
Begin {
$obj = [PSCustomObject]@{}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
End {
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.IoT.TopicRule.S3Action'
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Property Types/Add-VSAutoScalingLaunchConfigurationBlockDeviceMapping.ps1
|
Add-VSAutoScalingLaunchConfigurationBlockDeviceMapping.ps1
|
function Add-VSAutoScalingLaunchConfigurationBlockDeviceMapping {
<#
.SYNOPSIS
Adds an AWS::AutoScaling::LaunchConfiguration.BlockDeviceMapping resource property to the template
.DESCRIPTION
Adds an AWS::AutoScaling::LaunchConfiguration.BlockDeviceMapping resource property to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig-blockdev-mapping.html
.PARAMETER DeviceName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig-blockdev-mapping.html#cfn-as-launchconfig-blockdev-mapping-devicename
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER Ebs
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig-blockdev-mapping.html#cfn-as-launchconfig-blockdev-mapping-ebs
Required: False
Type: BlockDevice
UpdateType: Mutable
.PARAMETER NoDevice
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig-blockdev-mapping.html#cfn-as-launchconfig-blockdev-mapping-nodevice
PrimitiveType: Boolean
Required: False
UpdateType: Mutable
.PARAMETER VirtualName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig-blockdev-mapping.html#cfn-as-launchconfig-blockdev-mapping-virtualname
PrimitiveType: String
Required: False
UpdateType: Mutable
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.AutoScaling.LaunchConfiguration.BlockDeviceMapping')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$DeviceName,
[parameter(Mandatory = $false)]
$Ebs,
[parameter(Mandatory = $false)]
[System.Boolean]
$NoDevice,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$VirtualName
)
Begin {
$obj = [PSCustomObject]@{}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
End {
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.AutoScaling.LaunchConfiguration.BlockDeviceMapping'
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Property Types/Add-VSElasticLoadBalancingLoadBalancerLBCookieStickinessPolicy.ps1
|
Add-VSElasticLoadBalancingLoadBalancerLBCookieStickinessPolicy.ps1
|
function Add-VSElasticLoadBalancingLoadBalancerLBCookieStickinessPolicy {
<#
.SYNOPSIS
Adds an AWS::ElasticLoadBalancing::LoadBalancer.LBCookieStickinessPolicy resource property to the template
.DESCRIPTION
Adds an AWS::ElasticLoadBalancing::LoadBalancer.LBCookieStickinessPolicy resource property to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-elb-LBCookieStickinessPolicy.html
.PARAMETER CookieExpirationPeriod
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-elb-LBCookieStickinessPolicy.html#cfn-elb-lbcookiestickinesspolicy-cookieexpirationperiod
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER PolicyName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-elb-LBCookieStickinessPolicy.html#cfn-elb-lbcookiestickinesspolicy-policyname
PrimitiveType: String
Required: False
UpdateType: Mutable
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.ElasticLoadBalancing.LoadBalancer.LBCookieStickinessPolicy')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$CookieExpirationPeriod,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$PolicyName
)
Begin {
$obj = [PSCustomObject]@{}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
End {
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.ElasticLoadBalancing.LoadBalancer.LBCookieStickinessPolicy'
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Property Types/Add-VSCognitoUserPoolInviteMessageTemplate.ps1
|
Add-VSCognitoUserPoolInviteMessageTemplate.ps1
|
function Add-VSCognitoUserPoolInviteMessageTemplate {
<#
.SYNOPSIS
Adds an AWS::Cognito::UserPool.InviteMessageTemplate resource property to the template
.DESCRIPTION
Adds an AWS::Cognito::UserPool.InviteMessageTemplate resource property to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-invitemessagetemplate.html
.PARAMETER EmailMessage
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-invitemessagetemplate.html#cfn-cognito-userpool-invitemessagetemplate-emailmessage
PrimitiveType: String
UpdateType: Mutable
.PARAMETER SMSMessage
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-invitemessagetemplate.html#cfn-cognito-userpool-invitemessagetemplate-smsmessage
PrimitiveType: String
UpdateType: Mutable
.PARAMETER EmailSubject
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-invitemessagetemplate.html#cfn-cognito-userpool-invitemessagetemplate-emailsubject
PrimitiveType: String
UpdateType: Mutable
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.Cognito.UserPool.InviteMessageTemplate')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$EmailMessage,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$SMSMessage,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$EmailSubject
)
Begin {
$obj = [PSCustomObject]@{}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
End {
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.Cognito.UserPool.InviteMessageTemplate'
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Property Types/Add-VSIoTTopicRuleCloudwatchMetricAction.ps1
|
Add-VSIoTTopicRuleCloudwatchMetricAction.ps1
|
function Add-VSIoTTopicRuleCloudwatchMetricAction {
<#
.SYNOPSIS
Adds an AWS::IoT::TopicRule.CloudwatchMetricAction resource property to the template
.DESCRIPTION
Adds an AWS::IoT::TopicRule.CloudwatchMetricAction resource property to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-cloudwatchmetric.html
.PARAMETER MetricName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-cloudwatchmetric.html#cfn-iot-cloudwatchmetric-metricname
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER MetricNamespace
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-cloudwatchmetric.html#cfn-iot-cloudwatchmetric-metricnamespace
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER MetricTimestamp
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-cloudwatchmetric.html#cfn-iot-cloudwatchmetric-metrictimestamp
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER MetricUnit
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-cloudwatchmetric.html#cfn-iot-cloudwatchmetric-metricunit
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER MetricValue
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-cloudwatchmetric.html#cfn-iot-cloudwatchmetric-metricvalue
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER RoleArn
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-cloudwatchmetric.html#cfn-iot-cloudwatchmetric-rolearn
PrimitiveType: String
Required: True
UpdateType: Mutable
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.IoT.TopicRule.CloudwatchMetricAction')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$MetricName,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$MetricNamespace,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$MetricTimestamp,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$MetricUnit,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$MetricValue,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$RoleArn
)
Begin {
$obj = [PSCustomObject]@{}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
End {
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.IoT.TopicRule.CloudwatchMetricAction'
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Property Types/Add-VSWAFByteMatchSetFieldToMatch.ps1
|
Add-VSWAFByteMatchSetFieldToMatch.ps1
|
function Add-VSWAFByteMatchSetFieldToMatch {
<#
.SYNOPSIS
Adds an AWS::WAF::ByteMatchSet.FieldToMatch resource property to the template
.DESCRIPTION
Adds an AWS::WAF::ByteMatchSet.FieldToMatch resource property to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-waf-bytematchset-bytematchtuples-fieldtomatch.html
.PARAMETER Data
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-waf-bytematchset-bytematchtuples-fieldtomatch.html#cfn-waf-bytematchset-bytematchtuples-fieldtomatch-data
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER Type
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-waf-bytematchset-bytematchtuples-fieldtomatch.html#cfn-waf-bytematchset-bytematchtuples-fieldtomatch-type
PrimitiveType: String
Required: True
UpdateType: Mutable
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.WAF.ByteMatchSet.FieldToMatch')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Data,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$Type
)
Begin {
$obj = [PSCustomObject]@{}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
End {
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.WAF.ByteMatchSet.FieldToMatch'
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Property Types/Add-VSLambdaFunctionCode.ps1
|
Add-VSLambdaFunctionCode.ps1
|
function Add-VSLambdaFunctionCode {
<#
.SYNOPSIS
Adds an AWS::Lambda::Function.Code resource property to the template
.DESCRIPTION
Adds an AWS::Lambda::Function.Code resource property to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html
.PARAMETER S3Bucket
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html#cfn-lambda-function-code-s3bucket
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER S3Key
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html#cfn-lambda-function-code-s3key
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER S3ObjectVersion
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html#cfn-lambda-function-code-s3objectversion
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER ZipFile
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html#cfn-lambda-function-code-zipfile
PrimitiveType: String
Required: False
UpdateType: Mutable
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.Lambda.Function.Code')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$S3Bucket,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$S3Key,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$S3ObjectVersion,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$ZipFile
)
Begin {
$obj = [PSCustomObject]@{}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
End {
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.Lambda.Function.Code'
}
}
|
PowerShellCorpus/PowerShellGallery/Vaporshell/0.7.3/Public/Resource Property Types/Add-VSApiGatewayApiKeyStageKey.ps1
|
Add-VSApiGatewayApiKeyStageKey.ps1
|
function Add-VSApiGatewayApiKeyStageKey {
<#
.SYNOPSIS
Adds an AWS::ApiGateway::ApiKey.StageKey resource property to the template
.DESCRIPTION
Adds an AWS::ApiGateway::ApiKey.StageKey resource property to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apitgateway-apikey-stagekey.html
.PARAMETER RestApiId
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apitgateway-apikey-stagekey.html#cfn-apigateway-apikey-stagekey-restapiid
PrimitiveType: String
Required: False
UpdateType: Mutable
.PARAMETER StageName
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apitgateway-apikey-stagekey.html#cfn-apigateway-apikey-stagekey-stagename
PrimitiveType: String
Required: False
UpdateType: Mutable
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.ApiGateway.ApiKey.StageKey')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$RestApiId,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."
}
})]
$StageName
)
Begin {
$obj = [PSCustomObject]@{}
}
Process {
foreach ($key in $PSBoundParameters.Keys) {
$val = $((Get-Variable $key).Value)
if ($val -eq "True") {
$val = "true"
}
elseif ($val -eq "False") {
$val = "false"
}
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $val
}
}
End {
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.ApiGateway.ApiKey.StageKey'
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.