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

Commit

Permalink
!deploy v2.4.0 to resolve #34 and update functions to latest spec sheet
Browse files Browse the repository at this point in the history
  • Loading branch information
scrthq committed Aug 15, 2018
1 parent 31190ce commit abc01b3
Show file tree
Hide file tree
Showing 10 changed files with 391 additions and 12 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- TOC -->

- [Changelog](#changelog)
- [2.4.0](#240)
- [2.3.0](#230)
- [2.2.1](#221)
- [2.2.0](#220)
Expand All @@ -29,6 +30,10 @@

<!-- /TOC -->

## 2.4.0

- Added `ToString()` method override to `New-VaporResource` for convenience during template building [Issue #34](https://github.com/scrthq/VaporShell/issues/34)

## 2.3.0

- Added DSL wrapper to allow a different style of template building
Expand Down
1 change: 1 addition & 0 deletions VaporShell/Public/Primary Functions/New-VaporResource.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ function New-VaporResource {
if ($UpdatePolicy) {
$obj.Props | Add-Member -MemberType NoteProperty -Name "UpdatePolicy" -Value $UpdatePolicy
}
$obj | Add-Member -MemberType ScriptMethod -Name ToString -Value {$this.LogicalId} -Force
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,24 @@
PrimitiveType: String
UpdateType: Mutable
.PARAMETER OverrideArtifactName
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html#cfn-codebuild-project-artifacts-overrideartifactname
PrimitiveType: Boolean
UpdateType: Mutable
.PARAMETER Packaging
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html#cfn-codebuild-project-artifacts-packaging
PrimitiveType: String
UpdateType: Mutable
.PARAMETER EncryptionDisabled
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html#cfn-codebuild-project-artifacts-encryptiondisabled
PrimitiveType: Boolean
UpdateType: Mutable
.PARAMETER Location
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html#cfn-codebuild-project-artifacts-location
Expand Down Expand Up @@ -75,6 +87,9 @@
})]
$Type,
[parameter(Mandatory = $false)]
[System.Boolean]
$OverrideArtifactName,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
Expand All @@ -86,6 +101,9 @@
})]
$Packaging,
[parameter(Mandatory = $false)]
[System.Boolean]
$EncryptionDisabled,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
function Add-VSGlueClassifierJsonClassifier {
<#
.SYNOPSIS
Adds an AWS::Glue::Classifier.JsonClassifier resource property to the template
.DESCRIPTION
Adds an AWS::Glue::Classifier.JsonClassifier resource property to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-classifier-jsonclassifier.html
.PARAMETER JsonPath
Required: True
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-classifier-jsonclassifier.html#cfn-glue-classifier-jsonclassifier-jsonpath
PrimitiveType: String
UpdateType: Mutable
.PARAMETER Name
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-classifier-jsonclassifier.html#cfn-glue-classifier-jsonclassifier-name
PrimitiveType: String
UpdateType: Immutable
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.Glue.Classifier.JsonClassifier')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
}
})]
$JsonPath,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
}
})]
$Name
)
Begin {
$obj = [PSCustomObject]@{}
$commonParams = @('Verbose','Debug','ErrorAction','WarningAction','InformationAction','ErrorVariable','WarningVariable','InformationVariable','OutVariable','OutBuffer','PipelineVariable')
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.Glue.Classifier.JsonClassifier'
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
function Add-VSGlueClassifierXMLClassifier {
<#
.SYNOPSIS
Adds an AWS::Glue::Classifier.XMLClassifier resource property to the template
.DESCRIPTION
Adds an AWS::Glue::Classifier.XMLClassifier resource property to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-classifier-xmlclassifier.html
.PARAMETER RowTag
Required: True
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-classifier-xmlclassifier.html#cfn-glue-classifier-xmlclassifier-rowtag
PrimitiveType: String
UpdateType: Mutable
.PARAMETER Classification
Required: True
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-classifier-xmlclassifier.html#cfn-glue-classifier-xmlclassifier-classification
PrimitiveType: String
UpdateType: Mutable
.PARAMETER Name
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-classifier-xmlclassifier.html#cfn-glue-classifier-xmlclassifier-name
PrimitiveType: String
UpdateType: Immutable
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.Glue.Classifier.XMLClassifier')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
}
})]
$RowTag,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
}
})]
$Classification,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
}
})]
$Name
)
Begin {
$obj = [PSCustomObject]@{}
$commonParams = @('Verbose','Debug','ErrorAction','WarningAction','InformationAction','ErrorVariable','WarningVariable','InformationVariable','OutVariable','OutBuffer','PipelineVariable')
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.Glue.Classifier.XMLClassifier'
}
}
22 changes: 11 additions & 11 deletions VaporShell/Public/Resource Property Types/Add-VSTag.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
Adds an Tag resource property to the template
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dms-endpoint-tag.html
.PARAMETER Key
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html#cfn-resource-tags-key
.PARAMETER Value
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dms-endpoint-tag.html#cfn-dms-endpoint-tag-value
PrimitiveType: String
Required: True
UpdateType: Mutable
.PARAMETER Value
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html#cfn-resource-tags-value
.PARAMETER Key
Required: False
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dms-endpoint-tag.html#cfn-dms-endpoint-tag-key
PrimitiveType: String
Required: True
UpdateType: Mutable
.FUNCTIONALITY
Expand All @@ -28,7 +28,7 @@
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true)]
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
Expand All @@ -38,8 +38,8 @@
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
}
})]
$Key,
[parameter(Mandatory = $true)]
$Value,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
Expand All @@ -49,7 +49,7 @@
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
}
})]
$Value
$Key
)
Begin {
$obj = [PSCustomObject]@{}
Expand Down
Loading

0 comments on commit abc01b3

Please sign in to comment.