Skip to content
This repository was archived by the owner on Oct 21, 2023. It is now read-only.

Commit 0a2fbdd

Browse files
authored
!deploy v2.12.2
## 2.12.2 - 2020-06-04 * [Issue #79](#79) * Fixed: Documentation on `New-VaporCondition`
2 parents d4f9292 + 5c24cfd commit 0a2fbdd

8 files changed

+317
-7
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<!-- TOC -->
22

3+
* [2.12.2 - 2020-06-04](#2122---2020-06-04)
34
* [2.12.1 - 2020-05-05](#2121---2020-05-05)
45
* [2.12.0 - 2020-05-03](#2120---2020-05-03)
56
* [2.11.1 - 2020-03-09](#2111---2020-03-09)
@@ -56,6 +57,11 @@
5657

5758
<!-- /TOC -->
5859

60+
## 2.12.2 - 2020-06-04
61+
62+
* [Issue #79](https://github.com/SCRT-HQ/VaporShell/issues/79)
63+
* Fixed: Documentation on `New-VaporCondition`
64+
5965
## 2.12.1 - 2020-05-05
6066

6167
* Miscellaneous

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Install-Module VaporShell -Scope CurrentUser
120120

121121
**[Alternative]** Not on PowerShell 5+, can't install PowerShellGet, or policies blocking installation from remote sources? You're covered as well:
122122

123-
1. Head to the [Releases](https://github.com/scrthq/VaporShell/releases) section in the repo
123+
1. Head to the [Releases](https://github.com/SCRT-HQ/VaporShell/releases) section in the repo
124124
2. Download the *VaporShell.zip* file attached to the latest release.
125125
3. **If on Windows**: Right-click the downloaded zip, select Properties, then unblock the file.
126126
> _This is to prevent having to unblock each file individually after unzipping._

VaporShell/Public/Primary Functions/New-VaporCondition.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ function New-VaporCondition {
22
<#
33
.SYNOPSIS
44
Adds a Condition object to the template
5-
5+
66
.DESCRIPTION
77
The optional Conditions section includes statements that define when a resource is created or when a property is defined. For example, you can compare whether a value is equal to another value. Based on the result of that condition, you can conditionally create resources. If you have multiple conditions, separate them with commas.
88
@@ -28,20 +28,20 @@ function New-VaporCondition {
2828
2929
.LINK
3030
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/conditions-section-structure.html
31-
31+
3232
.PARAMETER LogicalId
3333
An identifier for the current condition. The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.
34-
34+
3535
.PARAMETER Condition
3636
Logical ID of the condition that this resource needs to be true in order to be provisioned.
3737
3838
.EXAMPLE
3939
$template = Initialize-Vaporshell -Description "Testing Condition addition"
40-
$template.AddResource((
40+
$template.AddCondition((
4141
New-VaporCondition -LogicalId "CreateProdResources" -Condition (Add-ConEquals -FirstValue (Add-FnRef -Ref "EnvType") -SecondValue "prod")
4242
))
4343
44-
When the template is exported, this will convert to:
44+
When the template is exported, this will convert to:
4545
{
4646
"AWSTemplateFormatVersion": "2010-09-09",
4747
"Description": "Testing Condition addition",
@@ -101,4 +101,4 @@ function New-VaporCondition {
101101
}
102102
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Condition'
103103
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n`t$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5 -Compress)`n"
104-
}
104+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
function Add-VSEC2ClientVpnEndpointFederatedAuthenticationRequest {
2+
<#
3+
.SYNOPSIS
4+
Adds an AWS::EC2::ClientVpnEndpoint.FederatedAuthenticationRequest resource property to the template.
5+
6+
.DESCRIPTION
7+
Adds an AWS::EC2::ClientVpnEndpoint.FederatedAuthenticationRequest resource property to the template.
8+
9+
10+
.LINK
11+
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-clientvpnendpoint-federatedauthenticationrequest.html
12+
13+
.PARAMETER SAMLProviderArn
14+
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-clientvpnendpoint-federatedauthenticationrequest.html#cfn-ec2-clientvpnendpoint-federatedauthenticationrequest-samlproviderarn
15+
PrimitiveType: String
16+
UpdateType: Mutable
17+
18+
.FUNCTIONALITY
19+
Vaporshell
20+
#>
21+
[OutputType('Vaporshell.Resource.EC2.ClientVpnEndpoint.FederatedAuthenticationRequest')]
22+
[cmdletbinding()]
23+
Param
24+
(
25+
[parameter(Mandatory = $true)]
26+
[ValidateScript( {
27+
$allowedTypes = "System.String","Vaporshell.Function","Vaporshell.Condition"
28+
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
29+
$true
30+
}
31+
else {
32+
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
33+
}
34+
})]
35+
$SAMLProviderArn
36+
)
37+
Begin {
38+
$obj = [PSCustomObject]@{}
39+
$commonParams = @('Verbose','Debug','ErrorAction','WarningAction','InformationAction','ErrorVariable','WarningVariable','InformationVariable','OutVariable','OutBuffer','PipelineVariable')
40+
}
41+
Process {
42+
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
43+
switch ($key) {
44+
Default {
45+
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
46+
}
47+
}
48+
}
49+
}
50+
End {
51+
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.EC2.ClientVpnEndpoint.FederatedAuthenticationRequest'
52+
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$($obj | ConvertTo-Json -Depth 5)`n"
53+
}
54+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
function Add-VSKinesisFirehoseDeliveryStreamRedshiftRetryOptions {
2+
<#
3+
.SYNOPSIS
4+
Adds an AWS::KinesisFirehose::DeliveryStream.RedshiftRetryOptions resource property to the template.
5+
6+
.DESCRIPTION
7+
Adds an AWS::KinesisFirehose::DeliveryStream.RedshiftRetryOptions resource property to the template.
8+
9+
10+
.LINK
11+
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-redshiftretryoptions.html
12+
13+
.PARAMETER DurationInSeconds
14+
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-redshiftretryoptions.html#cfn-kinesisfirehose-deliverystream-redshiftretryoptions-durationinseconds
15+
UpdateType: Mutable
16+
PrimitiveType: Integer
17+
18+
.FUNCTIONALITY
19+
Vaporshell
20+
#>
21+
[OutputType('Vaporshell.Resource.KinesisFirehose.DeliveryStream.RedshiftRetryOptions')]
22+
[cmdletbinding()]
23+
Param
24+
(
25+
[parameter(Mandatory = $false)]
26+
[ValidateScript( {
27+
$allowedTypes = "System.Int32","Vaporshell.Function"
28+
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
29+
$true
30+
}
31+
else {
32+
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
33+
}
34+
})]
35+
$DurationInSeconds
36+
)
37+
Begin {
38+
$obj = [PSCustomObject]@{}
39+
$commonParams = @('Verbose','Debug','ErrorAction','WarningAction','InformationAction','ErrorVariable','WarningVariable','InformationVariable','OutVariable','OutBuffer','PipelineVariable')
40+
}
41+
Process {
42+
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
43+
switch ($key) {
44+
Default {
45+
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
46+
}
47+
}
48+
}
49+
}
50+
End {
51+
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.KinesisFirehose.DeliveryStream.RedshiftRetryOptions'
52+
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$($obj | ConvertTo-Json -Depth 5)`n"
53+
}
54+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
function Add-VSKinesisFirehoseDeliveryStreamVpcConfiguration {
2+
<#
3+
.SYNOPSIS
4+
Adds an AWS::KinesisFirehose::DeliveryStream.VpcConfiguration resource property to the template.
5+
6+
.DESCRIPTION
7+
Adds an AWS::KinesisFirehose::DeliveryStream.VpcConfiguration resource property to the template.
8+
9+
10+
.LINK
11+
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-vpcconfiguration.html
12+
13+
.PARAMETER RoleARN
14+
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-vpcconfiguration.html#cfn-kinesisfirehose-deliverystream-vpcconfiguration-rolearn
15+
UpdateType: Immutable
16+
PrimitiveType: String
17+
18+
.PARAMETER SubnetIds
19+
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-vpcconfiguration.html#cfn-kinesisfirehose-deliverystream-vpcconfiguration-subnetids
20+
UpdateType: Immutable
21+
Type: List
22+
PrimitiveItemType: String
23+
DuplicatesAllowed: False
24+
25+
.PARAMETER SecurityGroupIds
26+
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-vpcconfiguration.html#cfn-kinesisfirehose-deliverystream-vpcconfiguration-securitygroupids
27+
UpdateType: Immutable
28+
Type: List
29+
PrimitiveItemType: String
30+
DuplicatesAllowed: False
31+
32+
.FUNCTIONALITY
33+
Vaporshell
34+
#>
35+
[OutputType('Vaporshell.Resource.KinesisFirehose.DeliveryStream.VpcConfiguration')]
36+
[cmdletbinding()]
37+
Param
38+
(
39+
[parameter(Mandatory = $true)]
40+
[ValidateScript( {
41+
$allowedTypes = "System.String","Vaporshell.Function","Vaporshell.Condition"
42+
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
43+
$true
44+
}
45+
else {
46+
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
47+
}
48+
})]
49+
$RoleARN,
50+
[parameter(Mandatory = $true)]
51+
$SubnetIds,
52+
[parameter(Mandatory = $true)]
53+
$SecurityGroupIds
54+
)
55+
Begin {
56+
$obj = [PSCustomObject]@{}
57+
$commonParams = @('Verbose','Debug','ErrorAction','WarningAction','InformationAction','ErrorVariable','WarningVariable','InformationVariable','OutVariable','OutBuffer','PipelineVariable')
58+
}
59+
Process {
60+
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
61+
switch ($key) {
62+
Default {
63+
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
64+
}
65+
}
66+
}
67+
}
68+
End {
69+
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.KinesisFirehose.DeliveryStream.VpcConfiguration'
70+
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$($obj | ConvertTo-Json -Depth 5)`n"
71+
}
72+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
function Add-VSStepFunctionsStateMachineDefinitionSubstitutions {
2+
<#
3+
.SYNOPSIS
4+
Adds an AWS::StepFunctions::StateMachine.DefinitionSubstitutions resource property to the template.
5+
6+
.DESCRIPTION
7+
Adds an AWS::StepFunctions::StateMachine.DefinitionSubstitutions resource property to the template.
8+
9+
10+
.LINK
11+
12+
13+
.FUNCTIONALITY
14+
Vaporshell
15+
#>
16+
[OutputType('Vaporshell.Resource.StepFunctions.StateMachine.DefinitionSubstitutions')]
17+
[cmdletbinding()]
18+
Param
19+
(
20+
)
21+
Begin {
22+
$obj = [PSCustomObject]@{}
23+
$commonParams = @('Verbose','Debug','ErrorAction','WarningAction','InformationAction','ErrorVariable','WarningVariable','InformationVariable','OutVariable','OutBuffer','PipelineVariable')
24+
}
25+
Process {
26+
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
27+
switch ($key) {
28+
Default {
29+
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
30+
}
31+
}
32+
}
33+
}
34+
End {
35+
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.StepFunctions.StateMachine.DefinitionSubstitutions'
36+
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$($obj | ConvertTo-Json -Depth 5)`n"
37+
}
38+
}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
function Add-VSStepFunctionsStateMachineS3Location {
2+
<#
3+
.SYNOPSIS
4+
Adds an AWS::StepFunctions::StateMachine.S3Location resource property to the template.
5+
6+
.DESCRIPTION
7+
Adds an AWS::StepFunctions::StateMachine.S3Location resource property to the template.
8+
9+
10+
.LINK
11+
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-s3location.html
12+
13+
.PARAMETER Bucket
14+
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-s3location.html#cfn-stepfunctions-statemachine-s3location-bucket
15+
PrimitiveType: String
16+
UpdateType: Mutable
17+
18+
.PARAMETER Version
19+
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-s3location.html#cfn-stepfunctions-statemachine-s3location-version
20+
PrimitiveType: String
21+
UpdateType: Mutable
22+
23+
.PARAMETER Key
24+
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-s3location.html#cfn-stepfunctions-statemachine-s3location-key
25+
PrimitiveType: String
26+
UpdateType: Mutable
27+
28+
.FUNCTIONALITY
29+
Vaporshell
30+
#>
31+
[OutputType('Vaporshell.Resource.StepFunctions.StateMachine.S3Location')]
32+
[cmdletbinding()]
33+
Param
34+
(
35+
[parameter(Mandatory = $true)]
36+
[ValidateScript( {
37+
$allowedTypes = "System.String","Vaporshell.Function","Vaporshell.Condition"
38+
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
39+
$true
40+
}
41+
else {
42+
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
43+
}
44+
})]
45+
$Bucket,
46+
[parameter(Mandatory = $false)]
47+
[ValidateScript( {
48+
$allowedTypes = "System.String","Vaporshell.Function","Vaporshell.Condition"
49+
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
50+
$true
51+
}
52+
else {
53+
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
54+
}
55+
})]
56+
$Version,
57+
[parameter(Mandatory = $true)]
58+
[ValidateScript( {
59+
$allowedTypes = "System.String","Vaporshell.Function","Vaporshell.Condition"
60+
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
61+
$true
62+
}
63+
else {
64+
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
65+
}
66+
})]
67+
$Key
68+
)
69+
Begin {
70+
$obj = [PSCustomObject]@{}
71+
$commonParams = @('Verbose','Debug','ErrorAction','WarningAction','InformationAction','ErrorVariable','WarningVariable','InformationVariable','OutVariable','OutBuffer','PipelineVariable')
72+
}
73+
Process {
74+
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
75+
switch ($key) {
76+
Default {
77+
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
78+
}
79+
}
80+
}
81+
}
82+
End {
83+
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.StepFunctions.StateMachine.S3Location'
84+
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$($obj | ConvertTo-Json -Depth 5)`n"
85+
}
86+
}

0 commit comments

Comments
 (0)