pspulumiyaml.azurenative.chaos.psm1
using module pspulumiyaml function Invoke-AzureNativeFunctionChaosGetCapability { param ( [parameter(mandatory=$False,HelpMessage='String that represents an Azure resource group.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='String that represents a resource type.)')] [string] $parentResourceType, [parameter(mandatory=$False,HelpMessage='String that represents a Capability resource name.)')] [string] $capabilityName, [parameter(mandatory=$False,HelpMessage='String that represents a resource name.)')] [string] $parentResourceName, [parameter(mandatory=$False,HelpMessage='String that represents a resource provider namespace.)')] [string] $parentProviderNamespace, [parameter(mandatory=$False,HelpMessage='String that represents a Target resource name.)')] [string] $targetName ) process { $arguments = @{} $arguments["capabilityName"] = $capabilityName $arguments["parentProviderNamespace"] = $parentProviderNamespace $arguments["parentResourceName"] = $parentResourceName $arguments["parentResourceType"] = $parentResourceType $arguments["resourceGroupName"] = $resourceGroupName $arguments["targetName"] = $targetName $functionObject = Invoke-PulumiFunction -Name azure-native:chaos:getCapability -variableName $([guid]::NewGuid().Guid) -Arguments $arguments return $functionObject } } function Invoke-AzureNativeFunctionChaosGetTarget { param ( [parameter(mandatory=$False,HelpMessage='String that represents an Azure resource group.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='String that represents a resource provider namespace.)')] [string] $parentProviderNamespace, [parameter(mandatory=$False,HelpMessage='String that represents a resource name.)')] [string] $parentResourceName, [parameter(mandatory=$False,HelpMessage='String that represents a resource type.)')] [string] $parentResourceType, [parameter(mandatory=$False,HelpMessage='String that represents a Target resource name.)')] [string] $targetName ) process { $arguments = @{} $arguments["parentProviderNamespace"] = $parentProviderNamespace $arguments["parentResourceName"] = $parentResourceName $arguments["parentResourceType"] = $parentResourceType $arguments["resourceGroupName"] = $resourceGroupName $arguments["targetName"] = $targetName $functionObject = Invoke-PulumiFunction -Name azure-native:chaos:getTarget -variableName $([guid]::NewGuid().Guid) -Arguments $arguments return $functionObject } } function Invoke-AzureNativeFunctionChaosGetExperiment { param ( [parameter(mandatory=$False,HelpMessage='String that represents an Azure resource group.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='String that represents a Experiment resource name.)')] [string] $experimentName ) process { $arguments = @{} $arguments["experimentName"] = $experimentName $arguments["resourceGroupName"] = $resourceGroupName $functionObject = Invoke-PulumiFunction -Name azure-native:chaos:getExperiment -variableName $([guid]::NewGuid().Guid) -Arguments $arguments return $functionObject } } function New-AzureNativeChaosTarget { [Alias('azure_native_chaos_target')] param ( [parameter(mandatory=$False,HelpMessage='String that represents a Target resource name.)')] [string] $targetName, [parameter(mandatory=$False,HelpMessage='String that represents a resource type.)')] [string] $parentResourceType, [parameter(mandatory=$False,HelpMessage='String that represents an Azure resource group.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='String that represents a resource name.)')] [string] $parentResourceName, [parameter(mandatory=$False,HelpMessage='String that represents a resource provider namespace.)')] [string] $parentProviderNamespace, [parameter(mandatory=$False,HelpMessage='The properties of the target resource.)')] $properties, [parameter(mandatory=$False,HelpMessage='Location of the target resource.)')] [string] $location, [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')] [string] $pulumiid ) process { $resource = [pulumiresource]::new($pulumiid, "azure-native:chaos:Target") $resource.properties["parentProviderNamespace"] = $parentProviderNamespace $resource.properties["parentResourceName"] = $parentResourceName $resource.properties["parentResourceType"] = $parentResourceType $resource.properties["properties"] = $properties $resource.properties["resourceGroupName"] = $resourceGroupName if($PSBoundParameters.Keys -icontains 'targetName') { $resource.properties["targetName"] = $targetName } if($PSBoundParameters.Keys -icontains 'location') { $resource.properties["location"] = $location } $global:pulumiresources += $resource return $resource } } function New-AzureNativeChaosCapability { [Alias('azure_native_chaos_capability')] param ( [parameter(mandatory=$False,HelpMessage='String that represents an Azure resource group.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='String that represents a resource type.)')] [string] $parentResourceType, [parameter(mandatory=$False,HelpMessage='String that represents a Capability resource name.)')] [string] $capabilityName, [parameter(mandatory=$False,HelpMessage='String that represents a resource name.)')] [string] $parentResourceName, [parameter(mandatory=$False,HelpMessage='String that represents a resource provider namespace.)')] [string] $parentProviderNamespace, [parameter(mandatory=$False,HelpMessage='String that represents a Target resource name.)')] [string] $targetName, [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')] [string] $pulumiid ) process { $resource = [pulumiresource]::new($pulumiid, "azure-native:chaos:Capability") $resource.properties["parentProviderNamespace"] = $parentProviderNamespace $resource.properties["parentResourceName"] = $parentResourceName $resource.properties["parentResourceType"] = $parentResourceType $resource.properties["resourceGroupName"] = $resourceGroupName $resource.properties["targetName"] = $targetName if($PSBoundParameters.Keys -icontains 'capabilityName') { $resource.properties["capabilityName"] = $capabilityName } $global:pulumiresources += $resource return $resource } } class Branch { [string] $name [object] $actions #todo add class here } function New-AzureNativeTypeChaosBranch { param ( [parameter(mandatory=$False,HelpMessage='String of the branch name.)')] [string] $name, [parameter(mandatory=$False,HelpMessage='List of actions.)')] $actions ) process { return $([Branch]$PSBoundParameters) } } class Step { [string] $name [Branch[]] $branches } function New-AzureNativeTypeChaosStep { param ( [parameter(mandatory=$False,HelpMessage='String of the step name.)')] [string] $name, [parameter(mandatory=$False,HelpMessage='List of branches.)')] $branches ) process { return $([Step]$PSBoundParameters) } } class TargetReference { [string] $id [ValidateSet('ChaosTarget')] [object] $type } function New-AzureNativeTypeChaosTargetReference { param ( [parameter(mandatory=$False,HelpMessage='String of the resource ID of a Target resource.)')] [string] $id, [parameter(mandatory=$False,HelpMessage='Enum of the Target reference type.)')] $type ) process { return $([TargetReference]$PSBoundParameters) } } class Selector { [string] $id [TargetReference[]] $targets [ValidateSet('Percent', 'Random', 'Tag', 'List')] [object] $type } function New-AzureNativeTypeChaosSelector { param ( [parameter(mandatory=$False,HelpMessage='String of the selector ID.)')] [string] $id, [parameter(mandatory=$False,HelpMessage='List of Target references.)')] $targets, [parameter(mandatory=$False,HelpMessage='Enum of the selector type.)')] $type ) process { return $([Selector]$PSBoundParameters) } } class ExperimentProperties { [Step[]] $steps [Selector[]] $selectors [bool] $startOnCreation } function New-AzureNativeTypeChaosExperimentProperties { param ( [parameter(mandatory=$False,HelpMessage='List of steps.)')] $steps, [parameter(mandatory=$False,HelpMessage='List of selectors.)')] $selectors, [parameter(mandatory=$False,HelpMessage='A boolean value that indicates if experiment should be started on creation or not.)')] [bool] $startOnCreation ) process { return $([ExperimentProperties]$PSBoundParameters) } } class ResourceIdentity { [ValidateSet('None', 'SystemAssigned')] [object] $type } function New-AzureNativeTypeChaosResourceIdentity { param ( [parameter(mandatory=$False,HelpMessage='String of the resource identity type.)')] $type ) process { return $([ResourceIdentity]$PSBoundParameters) } } function New-AzureNativeChaosExperiment { [Alias('azure_native_chaos_experiment')] param ( [parameter(mandatory=$False,HelpMessage='String that represents an Azure resource group.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='The properties of the experiment resource.)')] [ExperimentProperties] $properties, [parameter(mandatory=$False,HelpMessage='Resource tags.)')] [hashtable] $tags, [parameter(mandatory=$False,HelpMessage='The identity of the experiment resource.)')] [ResourceIdentity] $identity, [parameter(mandatory=$False,HelpMessage='String that represents a Experiment resource name.)')] [string] $experimentName, [parameter(mandatory=$False,HelpMessage='The geo-location where the resource lives)')] [string] $location, [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')] [string] $pulumiid ) process { $resource = [pulumiresource]::new($pulumiid, "azure-native:chaos:Experiment") $resource.properties["properties"] = $properties $resource.properties["resourceGroupName"] = $resourceGroupName if($PSBoundParameters.Keys -icontains 'tags') { $resource.properties["tags"] = $tags } if($PSBoundParameters.Keys -icontains 'identity') { $resource.properties["identity"] = $identity } if($PSBoundParameters.Keys -icontains 'experimentName') { $resource.properties["experimentName"] = $experimentName } if($PSBoundParameters.Keys -icontains 'location') { $resource.properties["location"] = $location } $global:pulumiresources += $resource return $resource } } |