pspulumiyaml.azurenative.chaos.psm1

using module @{ ModuleName = "PSPulumiYaml"; ModuleVersion = "0.0.3"; GUID = "909344e0-a08f-45f6-8177-80e36bb2ba58" }
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 name.)')]
        [string]
        $parentResourceName,
        [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 Target resource name.)')]
        [string]
        $targetName,
        [parameter(mandatory=$False,HelpMessage='String that represents a resource provider namespace.)')]
        [string]
        $parentProviderNamespace
    )

    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 type.)')]
        [string]
        $parentResourceType,
        [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=$False,HelpMessage='String that represents a resource name.)')]
        [string]
        $parentResourceName
    )

    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-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 name.)')]
        [string]
        $parentResourceName,
        [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 Target resource name.)')]
        [string]
        $targetName,
        [parameter(mandatory=$False,HelpMessage='String that represents a resource provider namespace.)')]
        [string]
        $parentProviderNamespace,
        [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')]
        [string]
        $pulumiid,
        [parameter(HelpMessage='Specifies a list of named output properties that should be treated as secrets, which means they will be encrypted. It augments the list of values that Pulumi detects, based on secret inputs to the resource.')]
        [string[]]
        $PulumiSecretOutputs,
        [parameter(HelpMessage='The aliases parameter provides a list of aliases for a resource or component resource. If youre changing the name, type, or parent path of a resource or component resource, you can add the old name to the list of aliases for a resource to ensure that existing resources will be migrated to the new name instead of being deleted and replaced with the new named resource.')]
        [string[]]
        $PulumiAliases,
        [parameter(HelpMessage='The customTimeouts parameter provides a set of custom timeouts for create, update, and delete operations on a resource. These timeouts are specified using a duration string such as 5m (5 minutes), 40s (40 seconds), or 1d (1 day). Supported duration units are ns, us (or µs), ms, s, m, and h (nanoseconds, microseconds, milliseconds, seconds, minutes, and hours, respectively).')]
        [pulumicustomtimeouts]
        $PulumiCustomTimeouts,
        [parameter(HelpMessage='Setting the PulumiDeleteBeforeReplace parameter to true means that Pulumi will delete the existing resource before creating its replacement. Be aware that this behavior has a cascading impact on dependencies so more resources may be replaced, which can lead to downtime. However, this option may be necessary for some resources that manage scarce resources behind the scenes, and/or resources that cannot exist side-by-side.')]
        [bool]
        $PulumiDeleteBeforeReplace,
        [parameter(HelpMessage='Creates a list of explicit dependencies between resources.The DependsOn parameter ensures that resource creation, update, and deletion operations are done in the correct order.')]
        [object[]]
        $PulumiDependsOn,
        [parameter(HelpMessage='Specifies a list of properties that Pulumi will ignore when it updates existing resources. Any properties specified in this list that are also specified in the resources arguments will only be used when creating the resource.')]
        [string[]]
        $PulumiIgnoreChanges,
        [parameter(HelpMessage='Imports an existing cloud resource so that Pulumi can manage it. To import a resource, first specify the PulumiImport parameter with the resources ID')]
        [string]
        $PulumiImport = [NullString]::Value,
        [parameter(HelpMessage='Specifies a parent for a resource. It is used to associate children with the parents that encapsulate or are responsible for them.')]
        [object]
        $PulumiParent = [NullString]::Value,
        [parameter(HelpMessage='Marks a resource as protected. A protected resource cannot be deleted directly, and it will be an error to do a Pulumi deployment which tries to delete a protected resource for any reason.')]
        [bool]
        $PulumiProtect,
        [parameter(HelpMessage='Sets a provider for the resource. The default is to inherit this value from the parent resource, and to use the ambient provider specified by Pulumi configuration for resources without a parent.')]
        [object]
        $PulumiProvider = [NullString]::Value,
        [parameter(HelpMessage='Sets a list of providers for the resource and its children. This list is combined with resource parents providers lists. If no value is provided, the providers list is identical to the parent. When determining which provider to use for a resource, the providers list is used if provider is not supplied.')]
        [object[]]
        $PulumiProviders,
        [parameter(HelpMessage='Used to indicate that changes to certain properties on a resource should force a replacement of the resource instead of an in-place update. Typically users rely on the resource provider to make this decision based on whether the input property is one that the provider knows how to update in place, or if not, requires a replacement to modify. However, there are cases where users want to replace a resource on a change to an input property even if the resource provider itself doesnt believe it has to replace the resource.')]
        [string[]]
        $PulumiReplaceOnChanges,
        [parameter(HelpMessage='Marks a resource to be retained. If this option is set then Pulumi will not call through to the resource providers Delete method when deleting or replacing the resource during pulumi up or pulumi destroy. As a result, the resource will not be deleted from the backing cloud provider, but will be removed from the Pulumi state.')]
        [bool]
        $PulumiRetainOnDelete,
        [parameter(HelpMessage='Specifies a provider version to use when operating on a resource. This version overrides the version information inferred from the current package. This option should be used rarely.')]
        [string]
        $PulumiProviderVersion = [NullString]::Value
    )

    process
    {
        $resource = [pulumiresource]::new($pulumiid, "azure-native:chaos:Capability")

        $resource.options.additionalSecretOutputs = $PulumiSecretOutputs
        $resource.options.aliases = $PulumiAliases
        $resource.options.customTimeouts = $PulumiCustomTimeouts
        $resource.options.deleteBeforeReplace = $PulumiDeleteBeforeReplace
        $resource.options.ignoreChanges = $PulumiIgnoreChanges
        $resource.options.import = if([string]::IsNullOrEmpty($PulumiImport)) { [NullString]::Value } else { $PulumiImport }
        $resource.options.protect = $PulumiProtect
        $resource.options.replaceOnChanges = $PulumiReplaceOnChanges
        $resource.options.retainOnDelete = $PulumiRetainOnDelete
        $resource.options.version = if([string]::IsNullOrEmpty($PulumiProviderVersion)) { [NullString]::Value } else { $PulumiProviderVersion }

        foreach($Dependency in $DependsOn)
        {
            if($Dependency -is [pulumiresource])
            {
                $resource.options.dependson += $Dependency.Reference()
            } else
            {
                $resource.options.dependson += $Dependency
            }
        }
        if($PulumiParent -is [pulumiresource])
        {
            $resource.options.parent = $PulumiParent.Reference()
        } else
        {
            $resource.options.parent = $PulumiParent
        }
        foreach($provider in $PulumiProviders)
        {
            if($provider -is [pulumiprovider])
            {
                $resource.options.providers += $provider.Reference()
            } else
            {
                $resource.options.providers += $provider
            }
        }
        if($PulumiProvider -is [pulumiprovider])
        {
            $resource.options.provider = $PulumiProvider.Reference()
        } else
        {
            $resource.options.provider = $PulumiProvider
        }
        $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 ResourceIdentity
{
    [ArgumentCompletions('None', 'SystemAssigned')]
    [object] $type
}
function New-AzureNativeTypeChaosResourceIdentity
{
    param (
        [parameter(mandatory=$False,HelpMessage='String of the resource identity type.)')]
        $type
    )

    process
    {
        return $([ResourceIdentity]$PSBoundParameters)
    }
}
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
    [ArgumentCompletions('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
{
    [TargetReference[]] $targets
    [ArgumentCompletions('Percent', 'Random', 'Tag', 'List')]
    [object] $type
    [string] $id
}
function New-AzureNativeTypeChaosSelector
{
    param (
        [parameter(mandatory=$False,HelpMessage='List of Target references.)')]
        $targets,
        [parameter(mandatory=$False,HelpMessage='Enum of the selector type.)')]
        $type,
        [parameter(mandatory=$False,HelpMessage='String of the selector ID.)')]
        [string]
        $id
    )

    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)
    }
}
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 identity of the experiment resource.)')]
        [ResourceIdentity]
        $identity,
        [parameter(mandatory=$False,HelpMessage='The geo-location where the resource lives)')]
        [string]
        $location,
        [parameter(mandatory=$False,HelpMessage='The properties of the experiment resource.)')]
        [ExperimentProperties]
        $properties,
        [parameter(mandatory=$False,HelpMessage='Resource tags.)')]
        [hashtable]
        $tags,
        [parameter(mandatory=$False,HelpMessage='String that represents a Experiment resource name.)')]
        [string]
        $experimentName,
        [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')]
        [string]
        $pulumiid,
        [parameter(HelpMessage='Specifies a list of named output properties that should be treated as secrets, which means they will be encrypted. It augments the list of values that Pulumi detects, based on secret inputs to the resource.')]
        [string[]]
        $PulumiSecretOutputs,
        [parameter(HelpMessage='The aliases parameter provides a list of aliases for a resource or component resource. If youre changing the name, type, or parent path of a resource or component resource, you can add the old name to the list of aliases for a resource to ensure that existing resources will be migrated to the new name instead of being deleted and replaced with the new named resource.')]
        [string[]]
        $PulumiAliases,
        [parameter(HelpMessage='The customTimeouts parameter provides a set of custom timeouts for create, update, and delete operations on a resource. These timeouts are specified using a duration string such as 5m (5 minutes), 40s (40 seconds), or 1d (1 day). Supported duration units are ns, us (or µs), ms, s, m, and h (nanoseconds, microseconds, milliseconds, seconds, minutes, and hours, respectively).')]
        [pulumicustomtimeouts]
        $PulumiCustomTimeouts,
        [parameter(HelpMessage='Setting the PulumiDeleteBeforeReplace parameter to true means that Pulumi will delete the existing resource before creating its replacement. Be aware that this behavior has a cascading impact on dependencies so more resources may be replaced, which can lead to downtime. However, this option may be necessary for some resources that manage scarce resources behind the scenes, and/or resources that cannot exist side-by-side.')]
        [bool]
        $PulumiDeleteBeforeReplace,
        [parameter(HelpMessage='Creates a list of explicit dependencies between resources.The DependsOn parameter ensures that resource creation, update, and deletion operations are done in the correct order.')]
        [object[]]
        $PulumiDependsOn,
        [parameter(HelpMessage='Specifies a list of properties that Pulumi will ignore when it updates existing resources. Any properties specified in this list that are also specified in the resources arguments will only be used when creating the resource.')]
        [string[]]
        $PulumiIgnoreChanges,
        [parameter(HelpMessage='Imports an existing cloud resource so that Pulumi can manage it. To import a resource, first specify the PulumiImport parameter with the resources ID')]
        [string]
        $PulumiImport = [NullString]::Value,
        [parameter(HelpMessage='Specifies a parent for a resource. It is used to associate children with the parents that encapsulate or are responsible for them.')]
        [object]
        $PulumiParent = [NullString]::Value,
        [parameter(HelpMessage='Marks a resource as protected. A protected resource cannot be deleted directly, and it will be an error to do a Pulumi deployment which tries to delete a protected resource for any reason.')]
        [bool]
        $PulumiProtect,
        [parameter(HelpMessage='Sets a provider for the resource. The default is to inherit this value from the parent resource, and to use the ambient provider specified by Pulumi configuration for resources without a parent.')]
        [object]
        $PulumiProvider = [NullString]::Value,
        [parameter(HelpMessage='Sets a list of providers for the resource and its children. This list is combined with resource parents providers lists. If no value is provided, the providers list is identical to the parent. When determining which provider to use for a resource, the providers list is used if provider is not supplied.')]
        [object[]]
        $PulumiProviders,
        [parameter(HelpMessage='Used to indicate that changes to certain properties on a resource should force a replacement of the resource instead of an in-place update. Typically users rely on the resource provider to make this decision based on whether the input property is one that the provider knows how to update in place, or if not, requires a replacement to modify. However, there are cases where users want to replace a resource on a change to an input property even if the resource provider itself doesnt believe it has to replace the resource.')]
        [string[]]
        $PulumiReplaceOnChanges,
        [parameter(HelpMessage='Marks a resource to be retained. If this option is set then Pulumi will not call through to the resource providers Delete method when deleting or replacing the resource during pulumi up or pulumi destroy. As a result, the resource will not be deleted from the backing cloud provider, but will be removed from the Pulumi state.')]
        [bool]
        $PulumiRetainOnDelete,
        [parameter(HelpMessage='Specifies a provider version to use when operating on a resource. This version overrides the version information inferred from the current package. This option should be used rarely.')]
        [string]
        $PulumiProviderVersion = [NullString]::Value
    )

    process
    {
        $resource = [pulumiresource]::new($pulumiid, "azure-native:chaos:Experiment")

        $resource.options.additionalSecretOutputs = $PulumiSecretOutputs
        $resource.options.aliases = $PulumiAliases
        $resource.options.customTimeouts = $PulumiCustomTimeouts
        $resource.options.deleteBeforeReplace = $PulumiDeleteBeforeReplace
        $resource.options.ignoreChanges = $PulumiIgnoreChanges
        $resource.options.import = if([string]::IsNullOrEmpty($PulumiImport)) { [NullString]::Value } else { $PulumiImport }
        $resource.options.protect = $PulumiProtect
        $resource.options.replaceOnChanges = $PulumiReplaceOnChanges
        $resource.options.retainOnDelete = $PulumiRetainOnDelete
        $resource.options.version = if([string]::IsNullOrEmpty($PulumiProviderVersion)) { [NullString]::Value } else { $PulumiProviderVersion }

        foreach($Dependency in $DependsOn)
        {
            if($Dependency -is [pulumiresource])
            {
                $resource.options.dependson += $Dependency.Reference()
            } else
            {
                $resource.options.dependson += $Dependency
            }
        }
        if($PulumiParent -is [pulumiresource])
        {
            $resource.options.parent = $PulumiParent.Reference()
        } else
        {
            $resource.options.parent = $PulumiParent
        }
        foreach($provider in $PulumiProviders)
        {
            if($provider -is [pulumiprovider])
            {
                $resource.options.providers += $provider.Reference()
            } else
            {
                $resource.options.providers += $provider
            }
        }
        if($PulumiProvider -is [pulumiprovider])
        {
            $resource.options.provider = $PulumiProvider.Reference()
        } else
        {
            $resource.options.provider = $PulumiProvider
        }
        $resource.properties["properties"] = $properties
        $resource.properties["resourceGroupName"] = $resourceGroupName

        if($PSBoundParameters.Keys -icontains 'identity')
        {
            $resource.properties["identity"] = $identity
        }

        if($PSBoundParameters.Keys -icontains 'location')
        {
            $resource.properties["location"] = $location
        }

        if($PSBoundParameters.Keys -icontains 'tags')
        {
            $resource.properties["tags"] = $tags
        }

        if($PSBoundParameters.Keys -icontains 'experimentName')
        {
            $resource.properties["experimentName"] = $experimentName
        }

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeChaosTarget
{
    [Alias('azure_native_chaos_target')]
    param (
        [parameter(mandatory=$False,HelpMessage='The properties of the target resource.)')]
        $properties,
        [parameter(mandatory=$False,HelpMessage='String that represents an Azure resource group.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='Location of the target resource.)')]
        [string]
        $location,
        [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,
        [parameter(mandatory=$False,HelpMessage='String that represents a resource provider namespace.)')]
        [string]
        $parentProviderNamespace,
        [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')]
        [string]
        $pulumiid,
        [parameter(HelpMessage='Specifies a list of named output properties that should be treated as secrets, which means they will be encrypted. It augments the list of values that Pulumi detects, based on secret inputs to the resource.')]
        [string[]]
        $PulumiSecretOutputs,
        [parameter(HelpMessage='The aliases parameter provides a list of aliases for a resource or component resource. If youre changing the name, type, or parent path of a resource or component resource, you can add the old name to the list of aliases for a resource to ensure that existing resources will be migrated to the new name instead of being deleted and replaced with the new named resource.')]
        [string[]]
        $PulumiAliases,
        [parameter(HelpMessage='The customTimeouts parameter provides a set of custom timeouts for create, update, and delete operations on a resource. These timeouts are specified using a duration string such as 5m (5 minutes), 40s (40 seconds), or 1d (1 day). Supported duration units are ns, us (or µs), ms, s, m, and h (nanoseconds, microseconds, milliseconds, seconds, minutes, and hours, respectively).')]
        [pulumicustomtimeouts]
        $PulumiCustomTimeouts,
        [parameter(HelpMessage='Setting the PulumiDeleteBeforeReplace parameter to true means that Pulumi will delete the existing resource before creating its replacement. Be aware that this behavior has a cascading impact on dependencies so more resources may be replaced, which can lead to downtime. However, this option may be necessary for some resources that manage scarce resources behind the scenes, and/or resources that cannot exist side-by-side.')]
        [bool]
        $PulumiDeleteBeforeReplace,
        [parameter(HelpMessage='Creates a list of explicit dependencies between resources.The DependsOn parameter ensures that resource creation, update, and deletion operations are done in the correct order.')]
        [object[]]
        $PulumiDependsOn,
        [parameter(HelpMessage='Specifies a list of properties that Pulumi will ignore when it updates existing resources. Any properties specified in this list that are also specified in the resources arguments will only be used when creating the resource.')]
        [string[]]
        $PulumiIgnoreChanges,
        [parameter(HelpMessage='Imports an existing cloud resource so that Pulumi can manage it. To import a resource, first specify the PulumiImport parameter with the resources ID')]
        [string]
        $PulumiImport = [NullString]::Value,
        [parameter(HelpMessage='Specifies a parent for a resource. It is used to associate children with the parents that encapsulate or are responsible for them.')]
        [object]
        $PulumiParent = [NullString]::Value,
        [parameter(HelpMessage='Marks a resource as protected. A protected resource cannot be deleted directly, and it will be an error to do a Pulumi deployment which tries to delete a protected resource for any reason.')]
        [bool]
        $PulumiProtect,
        [parameter(HelpMessage='Sets a provider for the resource. The default is to inherit this value from the parent resource, and to use the ambient provider specified by Pulumi configuration for resources without a parent.')]
        [object]
        $PulumiProvider = [NullString]::Value,
        [parameter(HelpMessage='Sets a list of providers for the resource and its children. This list is combined with resource parents providers lists. If no value is provided, the providers list is identical to the parent. When determining which provider to use for a resource, the providers list is used if provider is not supplied.')]
        [object[]]
        $PulumiProviders,
        [parameter(HelpMessage='Used to indicate that changes to certain properties on a resource should force a replacement of the resource instead of an in-place update. Typically users rely on the resource provider to make this decision based on whether the input property is one that the provider knows how to update in place, or if not, requires a replacement to modify. However, there are cases where users want to replace a resource on a change to an input property even if the resource provider itself doesnt believe it has to replace the resource.')]
        [string[]]
        $PulumiReplaceOnChanges,
        [parameter(HelpMessage='Marks a resource to be retained. If this option is set then Pulumi will not call through to the resource providers Delete method when deleting or replacing the resource during pulumi up or pulumi destroy. As a result, the resource will not be deleted from the backing cloud provider, but will be removed from the Pulumi state.')]
        [bool]
        $PulumiRetainOnDelete,
        [parameter(HelpMessage='Specifies a provider version to use when operating on a resource. This version overrides the version information inferred from the current package. This option should be used rarely.')]
        [string]
        $PulumiProviderVersion = [NullString]::Value
    )

    process
    {
        $resource = [pulumiresource]::new($pulumiid, "azure-native:chaos:Target")

        $resource.options.additionalSecretOutputs = $PulumiSecretOutputs
        $resource.options.aliases = $PulumiAliases
        $resource.options.customTimeouts = $PulumiCustomTimeouts
        $resource.options.deleteBeforeReplace = $PulumiDeleteBeforeReplace
        $resource.options.ignoreChanges = $PulumiIgnoreChanges
        $resource.options.import = if([string]::IsNullOrEmpty($PulumiImport)) { [NullString]::Value } else { $PulumiImport }
        $resource.options.protect = $PulumiProtect
        $resource.options.replaceOnChanges = $PulumiReplaceOnChanges
        $resource.options.retainOnDelete = $PulumiRetainOnDelete
        $resource.options.version = if([string]::IsNullOrEmpty($PulumiProviderVersion)) { [NullString]::Value } else { $PulumiProviderVersion }

        foreach($Dependency in $DependsOn)
        {
            if($Dependency -is [pulumiresource])
            {
                $resource.options.dependson += $Dependency.Reference()
            } else
            {
                $resource.options.dependson += $Dependency
            }
        }
        if($PulumiParent -is [pulumiresource])
        {
            $resource.options.parent = $PulumiParent.Reference()
        } else
        {
            $resource.options.parent = $PulumiParent
        }
        foreach($provider in $PulumiProviders)
        {
            if($provider -is [pulumiprovider])
            {
                $resource.options.providers += $provider.Reference()
            } else
            {
                $resource.options.providers += $provider
            }
        }
        if($PulumiProvider -is [pulumiprovider])
        {
            $resource.options.provider = $PulumiProvider.Reference()
        } else
        {
            $resource.options.provider = $PulumiProvider
        }
        $resource.properties["parentProviderNamespace"] = $parentProviderNamespace
        $resource.properties["parentResourceName"] = $parentResourceName
        $resource.properties["parentResourceType"] = $parentResourceType
        $resource.properties["properties"] = $properties
        $resource.properties["resourceGroupName"] = $resourceGroupName

        if($PSBoundParameters.Keys -icontains 'location')
        {
            $resource.properties["location"] = $location
        }

        if($PSBoundParameters.Keys -icontains 'targetName')
        {
            $resource.properties["targetName"] = $targetName
        }

        $global:pulumiresources += $resource
        return $resource
    }
}