pspulumiyaml.azurenative.servicefabric.psm1
using module @{ ModuleName = "PSPulumiYaml"; ModuleVersion = "0.0.3"; GUID = "909344e0-a08f-45f6-8177-80e36bb2ba58" } function Invoke-AzureNativeFunctionServicefabricGetApplicationType { param ( [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='The name of the application type name resource.)')] [string] $applicationTypeName, [parameter(mandatory=$False,HelpMessage='The name of the cluster resource.)')] [string] $clusterName ) process { $arguments = @{} $arguments["applicationTypeName"] = $applicationTypeName $arguments["clusterName"] = $clusterName $arguments["resourceGroupName"] = $resourceGroupName $functionObject = Invoke-PulumiFunction -Name azure-native:servicefabric:getApplicationType -variableName $([guid]::NewGuid().Guid) -Arguments $arguments return $functionObject } } function Invoke-AzureNativeFunctionServicefabricGetmanagedAzResiliencyStatus { param ( [parameter(mandatory=$False,HelpMessage='The name of the cluster resource.)')] [string] $clusterName, [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')] [string] $resourceGroupName ) process { $arguments = @{} $arguments["clusterName"] = $clusterName $arguments["resourceGroupName"] = $resourceGroupName $functionObject = Invoke-PulumiFunction -Name azure-native:servicefabric:getmanagedAzResiliencyStatus -variableName $([guid]::NewGuid().Guid) -Arguments $arguments return $functionObject } } function Invoke-AzureNativeFunctionServicefabricGetManagedCluster { param ( [parameter(mandatory=$False,HelpMessage='The name of the cluster resource.)')] [string] $clusterName, [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')] [string] $resourceGroupName ) process { $arguments = @{} $arguments["clusterName"] = $clusterName $arguments["resourceGroupName"] = $resourceGroupName $functionObject = Invoke-PulumiFunction -Name azure-native:servicefabric:getManagedCluster -variableName $([guid]::NewGuid().Guid) -Arguments $arguments return $functionObject } } function Invoke-AzureNativeFunctionServicefabricGetService { param ( [parameter(mandatory=$False,HelpMessage='The name of the service resource in the format of {applicationName}~{serviceName}.)')] [string] $serviceName, [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='The name of the application resource.)')] [string] $applicationName, [parameter(mandatory=$False,HelpMessage='The name of the cluster resource.)')] [string] $clusterName ) process { $arguments = @{} $arguments["applicationName"] = $applicationName $arguments["clusterName"] = $clusterName $arguments["resourceGroupName"] = $resourceGroupName $arguments["serviceName"] = $serviceName $functionObject = Invoke-PulumiFunction -Name azure-native:servicefabric:getService -variableName $([guid]::NewGuid().Guid) -Arguments $arguments return $functionObject } } function Invoke-AzureNativeFunctionServicefabricGetApplicationTypeVersion { param ( [parameter(mandatory=$False,HelpMessage='The application type version.)')] [string] $version, [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='The name of the application type name resource.)')] [string] $applicationTypeName, [parameter(mandatory=$False,HelpMessage='The name of the cluster resource.)')] [string] $clusterName ) process { $arguments = @{} $arguments["applicationTypeName"] = $applicationTypeName $arguments["clusterName"] = $clusterName $arguments["resourceGroupName"] = $resourceGroupName $arguments["version"] = $version $functionObject = Invoke-PulumiFunction -Name azure-native:servicefabric:getApplicationTypeVersion -variableName $([guid]::NewGuid().Guid) -Arguments $arguments return $functionObject } } function Invoke-AzureNativeFunctionServicefabricListListUpgradableVersionPost { param ( [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='The target code version.)')] [string] $targetVersion, [parameter(mandatory=$False,HelpMessage='The name of the cluster resource.)')] [string] $clusterName ) process { $arguments = @{} $arguments["clusterName"] = $clusterName $arguments["resourceGroupName"] = $resourceGroupName $arguments["targetVersion"] = $targetVersion $functionObject = Invoke-PulumiFunction -Name azure-native:servicefabric:listListUpgradableVersionPost -variableName $([guid]::NewGuid().Guid) -Arguments $arguments return $functionObject } } function Invoke-AzureNativeFunctionServicefabricGetNodeType { param ( [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='The name of the node type.)')] [string] $nodeTypeName, [parameter(mandatory=$False,HelpMessage='The name of the cluster resource.)')] [string] $clusterName ) process { $arguments = @{} $arguments["clusterName"] = $clusterName $arguments["nodeTypeName"] = $nodeTypeName $arguments["resourceGroupName"] = $resourceGroupName $functionObject = Invoke-PulumiFunction -Name azure-native:servicefabric:getNodeType -variableName $([guid]::NewGuid().Guid) -Arguments $arguments return $functionObject } } function Invoke-AzureNativeFunctionServicefabricGetApplication { param ( [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='The name of the application resource.)')] [string] $applicationName, [parameter(mandatory=$False,HelpMessage='The name of the cluster resource.)')] [string] $clusterName ) process { $arguments = @{} $arguments["applicationName"] = $applicationName $arguments["clusterName"] = $clusterName $arguments["resourceGroupName"] = $resourceGroupName $functionObject = Invoke-PulumiFunction -Name azure-native:servicefabric:getApplication -variableName $([guid]::NewGuid().Guid) -Arguments $arguments return $functionObject } } function Invoke-AzureNativeFunctionServicefabricGetCluster { param ( [parameter(mandatory=$False,HelpMessage='The name of the cluster resource.)')] [string] $clusterName, [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')] [string] $resourceGroupName ) process { $arguments = @{} $arguments["clusterName"] = $clusterName $arguments["resourceGroupName"] = $resourceGroupName $functionObject = Invoke-PulumiFunction -Name azure-native:servicefabric:getCluster -variableName $([guid]::NewGuid().Guid) -Arguments $arguments return $functionObject } } class UniformInt64RangePartitionSchemeDescription { [string] $lowKey [string] $highKey [string] $partitionScheme [int] $count } function New-AzureNativeTypeServicefabricUniformInt64RangePartitionSchemeDescription { param ( [parameter(mandatory=$False,HelpMessage='String indicating the lower bound of the partition key range that should be split between the partition ''count'' )')] [string] $lowKey, [parameter(mandatory=$False,HelpMessage='String indicating the upper bound of the partition key range that should be split between the partition ''count'' )')] [string] $highKey, [parameter(mandatory=$False,HelpMessage='Enumerates the ways that a service can be partitioned. Expected value is ''UniformInt64Range''.)')] [string] $partitionScheme, [parameter(mandatory=$False,HelpMessage='The number of partitions.)')] [int] $count ) process { return $([UniformInt64RangePartitionSchemeDescription]$PSBoundParameters) } } function New-AzureNativeServicefabricService { [Alias('azure_native_servicefabric_service')] param ( [parameter(mandatory=$False,HelpMessage='The name of the application resource.)')] [string] $applicationName, [parameter(mandatory=$False,HelpMessage='The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)".)')] [string] $placementConstraints, [parameter(mandatory=$False,HelpMessage='Specifies the move cost for the service.)')] [string] [ArgumentCompletions('Zero', 'Low', 'Medium', 'High')] $defaultMoveCost, [parameter(mandatory=$False,HelpMessage='The name of the service type)')] [string] $serviceTypeName, [parameter(mandatory=$False,HelpMessage='The name of the service resource in the format of {applicationName}~{serviceName}.)')] [string] $serviceName, [parameter(mandatory=$False,HelpMessage='A list that describes the correlation of the service with other services.)')] $servicePlacementPolicies, [parameter(mandatory=$False,HelpMessage='Dns name used for the service. If this is specified, then the service can be accessed via its DNS name instead of service name.)')] [string] $serviceDnsName, [parameter(mandatory=$False,HelpMessage='It will be deprecated in New API, resource location depends on the parent resource.)')] [string] $location, [parameter(mandatory=$False,HelpMessage='Azure resource tags.)')] [hashtable] $tags, [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='The kind of service (Stateless or Stateful).)')] [string] [ArgumentCompletions('Invalid', 'Stateless', 'Stateful')] $serviceKind, [parameter(mandatory=$False,HelpMessage='The service load metrics is given as an array of ServiceLoadMetricDescription objects.)')] $serviceLoadMetrics, [parameter(mandatory=$False,HelpMessage='The name of the cluster resource.)')] [string] $clusterName, [parameter(mandatory=$False,HelpMessage='Describes how the service is partitioned.)')] [UniformInt64RangePartitionSchemeDescription] $partitionDescription, [parameter(mandatory=$False,HelpMessage='A list that describes the correlation of the service with other services.)')] $correlationScheme, [parameter(mandatory=$False,HelpMessage='The activation Mode of the service package)')] [string] [ArgumentCompletions('SharedProcess', 'ExclusiveProcess')] $servicePackageActivationMode, [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:servicefabric:Service") $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["applicationName"] = $applicationName $resource.properties["clusterName"] = $clusterName $resource.properties["resourceGroupName"] = $resourceGroupName $resource.properties["serviceKind"] = $serviceKind if($PSBoundParameters.Keys -icontains 'placementConstraints') { $resource.properties["placementConstraints"] = $placementConstraints } if($PSBoundParameters.Keys -icontains 'defaultMoveCost') { $resource.properties["defaultMoveCost"] = $defaultMoveCost } if($PSBoundParameters.Keys -icontains 'serviceTypeName') { $resource.properties["serviceTypeName"] = $serviceTypeName } if($PSBoundParameters.Keys -icontains 'serviceName') { $resource.properties["serviceName"] = $serviceName } if($PSBoundParameters.Keys -icontains 'servicePlacementPolicies') { $resource.properties["servicePlacementPolicies"] = $servicePlacementPolicies } if($PSBoundParameters.Keys -icontains 'serviceDnsName') { $resource.properties["serviceDnsName"] = $serviceDnsName } if($PSBoundParameters.Keys -icontains 'location') { $resource.properties["location"] = $location } if($PSBoundParameters.Keys -icontains 'tags') { $resource.properties["tags"] = $tags } if($PSBoundParameters.Keys -icontains 'serviceLoadMetrics') { $resource.properties["serviceLoadMetrics"] = $serviceLoadMetrics } if($PSBoundParameters.Keys -icontains 'partitionDescription') { $resource.properties["partitionDescription"] = $partitionDescription } if($PSBoundParameters.Keys -icontains 'correlationScheme') { $resource.properties["correlationScheme"] = $correlationScheme } if($PSBoundParameters.Keys -icontains 'servicePackageActivationMode') { $resource.properties["servicePackageActivationMode"] = $servicePackageActivationMode } $global:pulumiresources += $resource return $resource } } function New-AzureNativeServicefabricApplicationTypeVersion { [Alias('azure_native_servicefabric_applicationtypeversion')] param ( [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='The name of the cluster resource.)')] [string] $clusterName, [parameter(mandatory=$False,HelpMessage='It will be deprecated in New API, resource location depends on the parent resource.)')] [string] $location, [parameter(mandatory=$False,HelpMessage='The name of the application type name resource.)')] [string] $applicationTypeName, [parameter(mandatory=$False,HelpMessage='Azure resource tags.)')] [hashtable] $tags, [parameter(mandatory=$False,HelpMessage='The URL to the application package)')] [string] $appPackageUrl, [parameter(mandatory=$False,HelpMessage='The application type version.)')] [string] $version, [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:servicefabric:ApplicationTypeVersion") $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["appPackageUrl"] = $appPackageUrl $resource.properties["applicationTypeName"] = $applicationTypeName $resource.properties["clusterName"] = $clusterName $resource.properties["resourceGroupName"] = $resourceGroupName if($PSBoundParameters.Keys -icontains 'location') { $resource.properties["location"] = $location } if($PSBoundParameters.Keys -icontains 'tags') { $resource.properties["tags"] = $tags } if($PSBoundParameters.Keys -icontains 'version') { $resource.properties["version"] = $version } $global:pulumiresources += $resource return $resource } } class ClusterHealthPolicy { [int] $maxPercentUnhealthyNodes [object] $applicationHealthPolicies [int] $maxPercentUnhealthyApplications } class ServiceTypeHealthPolicy { [int] $maxPercentUnhealthyServices } function New-AzureNativeTypeServicefabricServiceTypeHealthPolicy { param ( [parameter(mandatory=$False,HelpMessage='The maximum percentage of services allowed to be unhealthy before your application is considered in error. )')] [int] $maxPercentUnhealthyServices ) process { return $([ServiceTypeHealthPolicy]$PSBoundParameters) } } class ApplicationHealthPolicy { [ServiceTypeHealthPolicy] $defaultServiceTypeHealthPolicy [object] $serviceTypeHealthPolicies } function New-AzureNativeTypeServicefabricApplicationHealthPolicy { param ( [parameter(mandatory=$False,HelpMessage='The health policy used by default to evaluate the health of a service type.)')] [ServiceTypeHealthPolicy] $defaultServiceTypeHealthPolicy, [parameter(mandatory=$False,HelpMessage='The map with service type health policy per service type name. The map is empty by default.)')] [ServiceTypeHealthPolicy] $serviceTypeHealthPolicies ) process { return $([ApplicationHealthPolicy]$PSBoundParameters) } } function New-AzureNativeTypeServicefabricClusterHealthPolicy { param ( [parameter(mandatory=$False,HelpMessage='The maximum allowed percentage of unhealthy nodes before reporting an error. For example, to allow 10% of nodes to be unhealthy, this value would be 10. The percentage represents the maximum tolerated percentage of nodes that can be unhealthy before the cluster is considered in error. If the percentage is respected but there is at least one unhealthy node, the health is evaluated as Warning. The percentage is calculated by dividing the number of unhealthy nodes over the total number of nodes in the cluster. The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. In large clusters, some nodes will always be down or out for repairs, so this percentage should be configured to tolerate that. )')] [int] $maxPercentUnhealthyNodes, [parameter(mandatory=$False,HelpMessage='Defines the application health policy map used to evaluate the health of an application or one of its children entities.)')] [ApplicationHealthPolicy] $applicationHealthPolicies, [parameter(mandatory=$False,HelpMessage='The maximum allowed percentage of unhealthy applications before reporting an error. For example, to allow 10% of applications to be unhealthy, this value would be 10. The percentage represents the maximum tolerated percentage of applications that can be unhealthy before the cluster is considered in error. If the percentage is respected but there is at least one unhealthy application, the health is evaluated as Warning. This is calculated by dividing the number of unhealthy applications over the total number of application instances in the cluster, excluding applications of application types that are included in the ApplicationTypeHealthPolicyMap. The computation rounds up to tolerate one failure on small numbers of applications. Default percentage is zero. )')] [int] $maxPercentUnhealthyApplications ) process { return $([ClusterHealthPolicy]$PSBoundParameters) } } class ClusterUpgradeDeltaHealthPolicy { [int] $maxPercentDeltaUnhealthyApplications [int] $maxPercentDeltaUnhealthyNodes [int] $maxPercentUpgradeDomainDeltaUnhealthyNodes [object] $applicationDeltaHealthPolicies } class ServiceTypeDeltaHealthPolicy { [int] $maxPercentDeltaUnhealthyServices } function New-AzureNativeTypeServicefabricServiceTypeDeltaHealthPolicy { param ( [parameter(mandatory=$False,HelpMessage='The maximum allowed percentage of services health degradation allowed during cluster upgrades. The delta is measured between the state of the services at the beginning of upgrade and the state of the services at the time of the health evaluation. The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. )')] [int] $maxPercentDeltaUnhealthyServices ) process { return $([ServiceTypeDeltaHealthPolicy]$PSBoundParameters) } } class ApplicationDeltaHealthPolicy { [ServiceTypeDeltaHealthPolicy] $defaultServiceTypeDeltaHealthPolicy [object] $serviceTypeDeltaHealthPolicies } function New-AzureNativeTypeServicefabricApplicationDeltaHealthPolicy { param ( [parameter(mandatory=$False,HelpMessage='The delta health policy used by default to evaluate the health of a service type when upgrading the cluster.)')] [ServiceTypeDeltaHealthPolicy] $defaultServiceTypeDeltaHealthPolicy, [parameter(mandatory=$False,HelpMessage='The map with service type delta health policy per service type name. The map is empty by default.)')] [ServiceTypeDeltaHealthPolicy] $serviceTypeDeltaHealthPolicies ) process { return $([ApplicationDeltaHealthPolicy]$PSBoundParameters) } } function New-AzureNativeTypeServicefabricClusterUpgradeDeltaHealthPolicy { param ( [parameter(mandatory=$False,HelpMessage='The maximum allowed percentage of applications health degradation allowed during cluster upgrades. The delta is measured between the state of the applications at the beginning of upgrade and the state of the applications at the time of the health evaluation. The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. System services are not included in this. )')] [int] $maxPercentDeltaUnhealthyApplications, [parameter(mandatory=$False,HelpMessage='The maximum allowed percentage of nodes health degradation allowed during cluster upgrades. The delta is measured between the state of the nodes at the beginning of upgrade and the state of the nodes at the time of the health evaluation. The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. )')] [int] $maxPercentDeltaUnhealthyNodes, [parameter(mandatory=$False,HelpMessage='The maximum allowed percentage of upgrade domain nodes health degradation allowed during cluster upgrades. The delta is measured between the state of the upgrade domain nodes at the beginning of upgrade and the state of the upgrade domain nodes at the time of the health evaluation. The check is performed after every upgrade domain upgrade completion for all completed upgrade domains to make sure the state of the upgrade domains is within tolerated limits. )')] [int] $maxPercentUpgradeDomainDeltaUnhealthyNodes, [parameter(mandatory=$False,HelpMessage='Defines the application delta health policy map used to evaluate the health of an application or one of its child entities when upgrading the cluster.)')] [ApplicationDeltaHealthPolicy] $applicationDeltaHealthPolicies ) process { return $([ClusterUpgradeDeltaHealthPolicy]$PSBoundParameters) } } class ClusterUpgradePolicy { [string] $upgradeDomainTimeout [string] $upgradeReplicaSetCheckTimeout [ClusterHealthPolicy] $healthPolicy [string] $upgradeTimeout [string] $healthCheckStableDuration [string] $healthCheckWaitDuration [bool] $forceRestart [ClusterUpgradeDeltaHealthPolicy] $deltaHealthPolicy [string] $healthCheckRetryTimeout } function New-AzureNativeTypeServicefabricClusterUpgradePolicy { param ( [parameter(mandatory=$False,HelpMessage='The amount of time each upgrade domain has to complete before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.)')] [string] $upgradeDomainTimeout, [parameter(mandatory=$False,HelpMessage='The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.)')] [string] $upgradeReplicaSetCheckTimeout, [parameter(mandatory=$False,HelpMessage='The cluster health policy used when upgrading the cluster.)')] [ClusterHealthPolicy] $healthPolicy, [parameter(mandatory=$False,HelpMessage='The amount of time the overall upgrade has to complete before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.)')] [string] $upgradeTimeout, [parameter(mandatory=$False,HelpMessage='The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. The duration can be in either hh:mm:ss or in d.hh:mm:ss.ms format.)')] [string] $healthCheckStableDuration, [parameter(mandatory=$False,HelpMessage='The length of time to wait after completing an upgrade domain before performing health checks. The duration can be in either hh:mm:ss or in d.hh:mm:ss.ms format.)')] [string] $healthCheckWaitDuration, [parameter(mandatory=$False,HelpMessage='If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data).)')] [bool] $forceRestart, [parameter(mandatory=$False,HelpMessage='The cluster delta health policy used when upgrading the cluster.)')] [ClusterUpgradeDeltaHealthPolicy] $deltaHealthPolicy, [parameter(mandatory=$False,HelpMessage='The amount of time to retry health evaluation when the application or cluster is unhealthy before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.)')] [string] $healthCheckRetryTimeout ) process { return $([ClusterUpgradePolicy]$PSBoundParameters) } } class AzureActiveDirectory { [string] $clusterApplication [string] $tenantId [string] $clientApplication } function New-AzureNativeTypeServicefabricAzureActiveDirectory { param ( [parameter(mandatory=$False,HelpMessage='Azure active directory cluster application id.)')] [string] $clusterApplication, [parameter(mandatory=$False,HelpMessage='Azure active directory tenant id.)')] [string] $tenantId, [parameter(mandatory=$False,HelpMessage='Azure active directory client application id.)')] [string] $clientApplication ) process { return $([AzureActiveDirectory]$PSBoundParameters) } } class ApplicationTypeVersionsCleanupPolicy { [int] $maxUnusedVersionsToKeep } function New-AzureNativeTypeServicefabricApplicationTypeVersionsCleanupPolicy { param ( [parameter(mandatory=$False,HelpMessage='Number of unused versions per application type to keep.)')] [int] $maxUnusedVersionsToKeep ) process { return $([ApplicationTypeVersionsCleanupPolicy]$PSBoundParameters) } } class CertificateDescription { [string] $thumbprint [string] $x509StoreName [string] $thumbprintSecondary } function New-AzureNativeTypeServicefabricCertificateDescription { param ( [parameter(mandatory=$False,HelpMessage='Thumbprint of the primary certificate.)')] [string] $thumbprint, [parameter(mandatory=$False,HelpMessage='The local certificate store location.)')] [string] $x509StoreName, [parameter(mandatory=$False,HelpMessage='Thumbprint of the secondary certificate.)')] [string] $thumbprintSecondary ) process { return $([CertificateDescription]$PSBoundParameters) } } class DiagnosticsStorageAccountConfig { [string] $blobEndpoint [string] $protectedAccountKeyName2 [string] $tableEndpoint [string] $queueEndpoint [string] $protectedAccountKeyName [string] $storageAccountName } function New-AzureNativeTypeServicefabricDiagnosticsStorageAccountConfig { param ( [parameter(mandatory=$False,HelpMessage='The blob endpoint of the azure storage account.)')] [string] $blobEndpoint, [parameter(mandatory=$False,HelpMessage='The secondary protected diagnostics storage key name. If one of the storage account keys is rotated the cluster will fallback to using the other.)')] [string] $protectedAccountKeyName2, [parameter(mandatory=$False,HelpMessage='The table endpoint of the azure storage account.)')] [string] $tableEndpoint, [parameter(mandatory=$False,HelpMessage='The queue endpoint of the azure storage account.)')] [string] $queueEndpoint, [parameter(mandatory=$False,HelpMessage='The protected diagnostics storage key name.)')] [string] $protectedAccountKeyName, [parameter(mandatory=$False,HelpMessage='The Azure storage account name.)')] [string] $storageAccountName ) process { return $([DiagnosticsStorageAccountConfig]$PSBoundParameters) } } class ServerCertificateCommonName { [string] $certificateIssuerThumbprint [string] $certificateCommonName } function New-AzureNativeTypeServicefabricServerCertificateCommonName { param ( [parameter(mandatory=$False,HelpMessage='The issuer thumbprint of the server certificate.)')] [string] $certificateIssuerThumbprint, [parameter(mandatory=$False,HelpMessage='The common name of the server certificate.)')] [string] $certificateCommonName ) process { return $([ServerCertificateCommonName]$PSBoundParameters) } } class ServerCertificateCommonNames { [ServerCertificateCommonName[]] $commonNames [string] $x509StoreName } function New-AzureNativeTypeServicefabricServerCertificateCommonNames { param ( [parameter(mandatory=$False,HelpMessage='The list of server certificates referenced by common name that are used to secure the cluster.)')] $commonNames, [parameter(mandatory=$False,HelpMessage='The local certificate store location.)')] [string] $x509StoreName ) process { return $([ServerCertificateCommonNames]$PSBoundParameters) } } function New-AzureNativeServicefabricCluster { [Alias('azure_native_servicefabric_cluster')] param ( [parameter(mandatory=$False,HelpMessage='The VM image VMSS has been configured with. Generic names such as Windows or Linux can be used.)')] [string] $vmImage, [parameter(mandatory=$False,HelpMessage='The policy to use when upgrading the cluster.)')] [ClusterUpgradePolicy] $upgradeDescription, [parameter(mandatory=$False,HelpMessage='The list of node types in the cluster.)')] $nodeTypes, [parameter(mandatory=$False,HelpMessage='The AAD authentication settings of the cluster.)')] [AzureActiveDirectory] $azureActiveDirectory, [parameter(mandatory=$False,HelpMessage='The policy used to clean up unused versions.)')] [ApplicationTypeVersionsCleanupPolicy] $applicationTypeVersionsCleanupPolicy, [parameter(mandatory=$False,HelpMessage='The list of add-on features to enable in the cluster.)')] [string[]] $addOnFeatures, [parameter(mandatory=$False,HelpMessage='The server certificate used by reverse proxy.)')] [CertificateDescription] $reverseProxyCertificate, [parameter(mandatory=$False,HelpMessage='The http management endpoint of the cluster.)')] [string] $managementEndpoint, [parameter(mandatory=$False,HelpMessage='The Service Fabric runtime version of the cluster. This property can only by set the user when **upgradeMode** is set to ''Manual''. To get list of available Service Fabric versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available version for existing clusters use **availableClusterVersions**.)')] [string] $clusterCodeVersion, [parameter(mandatory=$False,HelpMessage='The upgrade mode of the cluster when new Service Fabric runtime version is available. - Automatic - The cluster will be automatically upgraded to the latest Service Fabric runtime version as soon as it is available. - Manual - The cluster will not be automatically upgraded to the latest Service Fabric runtime version. The cluster is upgraded by setting the **clusterCodeVersion** property in the cluster resource. )')] [string] $upgradeMode, [parameter(mandatory=$False,HelpMessage='The list of custom fabric settings to configure the cluster.)')] $fabricSettings, [parameter(mandatory=$False,HelpMessage='The reliability level sets the replica set size of system services. Learn about [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity). - None - Run the System services with a target replica set count of 1. This should only be used for test clusters. - Bronze - Run the System services with a target replica set count of 3. This should only be used for test clusters. - Silver - Run the System services with a target replica set count of 5. - Gold - Run the System services with a target replica set count of 7. - Platinum - Run the System services with a target replica set count of 9. )')] [string] $reliabilityLevel, [parameter(mandatory=$False,HelpMessage='Azure resource tags.)')] [hashtable] $tags, [parameter(mandatory=$False,HelpMessage='The storage account information for storing Service Fabric diagnostic logs.)')] [DiagnosticsStorageAccountConfig] $diagnosticsStorageAccountConfig, [parameter(mandatory=$False,HelpMessage='Describes a list of server certificates referenced by common name that are used to secure the cluster.)')] [ServerCertificateCommonNames] $reverseProxyCertificateCommonNames, [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='Indicates if the event store service is enabled.)')] [bool] $eventStoreServiceEnabled, [parameter(mandatory=$False,HelpMessage='Azure resource location.)')] [string] $location, [parameter(mandatory=$False,HelpMessage='The certificate to use for securing the cluster. The certificate provided will be used for node to node security within the cluster, SSL certificate for cluster management endpoint and default admin client.)')] [CertificateDescription] $certificate, [parameter(mandatory=$False,HelpMessage='Describes a list of server certificates referenced by common name that are used to secure the cluster.)')] [ServerCertificateCommonNames] $certificateCommonNames, [parameter(mandatory=$False,HelpMessage='The list of client certificates referenced by thumbprint that are allowed to manage the cluster.)')] $clientCertificateThumbprints, [parameter(mandatory=$False,HelpMessage='The name of the cluster resource.)')] [string] $clusterName, [parameter(mandatory=$False,HelpMessage='The list of client certificates referenced by common name that are allowed to manage the cluster.)')] $clientCertificateCommonNames, [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:servicefabric:Cluster") $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["managementEndpoint"] = $managementEndpoint $resource.properties["nodeTypes"] = $nodeTypes $resource.properties["resourceGroupName"] = $resourceGroupName if($PSBoundParameters.Keys -icontains 'vmImage') { $resource.properties["vmImage"] = $vmImage } if($PSBoundParameters.Keys -icontains 'upgradeDescription') { $resource.properties["upgradeDescription"] = $upgradeDescription } if($PSBoundParameters.Keys -icontains 'azureActiveDirectory') { $resource.properties["azureActiveDirectory"] = $azureActiveDirectory } if($PSBoundParameters.Keys -icontains 'applicationTypeVersionsCleanupPolicy') { $resource.properties["applicationTypeVersionsCleanupPolicy"] = $applicationTypeVersionsCleanupPolicy } if($PSBoundParameters.Keys -icontains 'addOnFeatures') { $resource.properties["addOnFeatures"] = $addOnFeatures } if($PSBoundParameters.Keys -icontains 'reverseProxyCertificate') { $resource.properties["reverseProxyCertificate"] = $reverseProxyCertificate } if($PSBoundParameters.Keys -icontains 'clusterCodeVersion') { $resource.properties["clusterCodeVersion"] = $clusterCodeVersion } if($PSBoundParameters.Keys -icontains 'upgradeMode') { $resource.properties["upgradeMode"] = $upgradeMode } if($PSBoundParameters.Keys -icontains 'fabricSettings') { $resource.properties["fabricSettings"] = $fabricSettings } if($PSBoundParameters.Keys -icontains 'reliabilityLevel') { $resource.properties["reliabilityLevel"] = $reliabilityLevel } if($PSBoundParameters.Keys -icontains 'tags') { $resource.properties["tags"] = $tags } if($PSBoundParameters.Keys -icontains 'diagnosticsStorageAccountConfig') { $resource.properties["diagnosticsStorageAccountConfig"] = $diagnosticsStorageAccountConfig } if($PSBoundParameters.Keys -icontains 'reverseProxyCertificateCommonNames') { $resource.properties["reverseProxyCertificateCommonNames"] = $reverseProxyCertificateCommonNames } if($PSBoundParameters.Keys -icontains 'eventStoreServiceEnabled') { $resource.properties["eventStoreServiceEnabled"] = $eventStoreServiceEnabled } if($PSBoundParameters.Keys -icontains 'location') { $resource.properties["location"] = $location } if($PSBoundParameters.Keys -icontains 'certificate') { $resource.properties["certificate"] = $certificate } if($PSBoundParameters.Keys -icontains 'certificateCommonNames') { $resource.properties["certificateCommonNames"] = $certificateCommonNames } if($PSBoundParameters.Keys -icontains 'clientCertificateThumbprints') { $resource.properties["clientCertificateThumbprints"] = $clientCertificateThumbprints } if($PSBoundParameters.Keys -icontains 'clusterName') { $resource.properties["clusterName"] = $clusterName } if($PSBoundParameters.Keys -icontains 'clientCertificateCommonNames') { $resource.properties["clientCertificateCommonNames"] = $clientCertificateCommonNames } $global:pulumiresources += $resource return $resource } } class Sku { [string] $name } function New-AzureNativeTypeServicefabricSku { param ( [parameter(mandatory=$False,HelpMessage='Sku Name.)')] [string] $name ) process { return $([Sku]$PSBoundParameters) } } function New-AzureNativeServicefabricManagedCluster { [Alias('azure_native_servicefabric_managedcluster')] param ( [parameter(mandatory=$False,HelpMessage='vm admin user name.)')] [string] $adminUserName, [parameter(mandatory=$False,HelpMessage='Describes load balancing rules.)')] $loadBalancingRules, [parameter(mandatory=$False,HelpMessage='client certificates for the cluster.)')] $clients, [parameter(mandatory=$False,HelpMessage='The name of the cluster resource.)')] [string] $clusterName, [parameter(mandatory=$False,HelpMessage='The sku of the managed cluster)')] [Sku] $sku, [parameter(mandatory=$False,HelpMessage='Azure resource tags.)')] [hashtable] $tags, [parameter(mandatory=$False,HelpMessage='The port used for client connections to the cluster.)')] [int] $clientConnectionPort, [parameter(mandatory=$False,HelpMessage='Azure resource location.)')] [string] $location, [parameter(mandatory=$False,HelpMessage='client certificates for the cluster.)')] [string[]] $addonFeatures, [parameter(mandatory=$False,HelpMessage='The list of custom fabric settings to configure the cluster.)')] $fabricSettings, [parameter(mandatory=$False,HelpMessage='vm admin user password.)')] [string] $adminPassword, [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='Azure active directory.)')] [AzureActiveDirectory] $azureActiveDirectory, [parameter(mandatory=$False,HelpMessage='The cluster dns name.)')] [string] $dnsName, [parameter(mandatory=$False,HelpMessage='The Service Fabric runtime version of the cluster. This property can only by set the user when **upgradeMode** is set to ''Manual''. To get list of available Service Fabric versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available version for existing clusters use **availableClusterVersions**.)')] [string] $clusterCodeVersion, [parameter(mandatory=$False,HelpMessage='The port used for http connections to the cluster.)')] [int] $httpGatewayConnectionPort, [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:servicefabric:ManagedCluster") $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["adminUserName"] = $adminUserName $resource.properties["dnsName"] = $dnsName $resource.properties["resourceGroupName"] = $resourceGroupName if($PSBoundParameters.Keys -icontains 'loadBalancingRules') { $resource.properties["loadBalancingRules"] = $loadBalancingRules } if($PSBoundParameters.Keys -icontains 'clients') { $resource.properties["clients"] = $clients } if($PSBoundParameters.Keys -icontains 'clusterName') { $resource.properties["clusterName"] = $clusterName } if($PSBoundParameters.Keys -icontains 'sku') { $resource.properties["sku"] = $sku } if($PSBoundParameters.Keys -icontains 'tags') { $resource.properties["tags"] = $tags } if($PSBoundParameters.Keys -icontains 'clientConnectionPort') { $resource.properties["clientConnectionPort"] = $clientConnectionPort } if($PSBoundParameters.Keys -icontains 'location') { $resource.properties["location"] = $location } if($PSBoundParameters.Keys -icontains 'addonFeatures') { $resource.properties["addonFeatures"] = $addonFeatures } if($PSBoundParameters.Keys -icontains 'fabricSettings') { $resource.properties["fabricSettings"] = $fabricSettings } if($PSBoundParameters.Keys -icontains 'adminPassword') { $resource.properties["adminPassword"] = $adminPassword } if($PSBoundParameters.Keys -icontains 'azureActiveDirectory') { $resource.properties["azureActiveDirectory"] = $azureActiveDirectory } if($PSBoundParameters.Keys -icontains 'clusterCodeVersion') { $resource.properties["clusterCodeVersion"] = $clusterCodeVersion } if($PSBoundParameters.Keys -icontains 'httpGatewayConnectionPort') { $resource.properties["httpGatewayConnectionPort"] = $httpGatewayConnectionPort } $global:pulumiresources += $resource return $resource } } function New-AzureNativeServicefabricApplicationType { [Alias('azure_native_servicefabric_applicationtype')] param ( [parameter(mandatory=$False,HelpMessage='It will be deprecated in New API, resource location depends on the parent resource.)')] [string] $location, [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='The name of the application type name resource.)')] [string] $applicationTypeName, [parameter(mandatory=$False,HelpMessage='Azure resource tags.)')] [hashtable] $tags, [parameter(mandatory=$False,HelpMessage='The name of the cluster resource.)')] [string] $clusterName, [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:servicefabric:ApplicationType") $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["clusterName"] = $clusterName $resource.properties["resourceGroupName"] = $resourceGroupName if($PSBoundParameters.Keys -icontains 'location') { $resource.properties["location"] = $location } if($PSBoundParameters.Keys -icontains 'applicationTypeName') { $resource.properties["applicationTypeName"] = $applicationTypeName } if($PSBoundParameters.Keys -icontains 'tags') { $resource.properties["tags"] = $tags } $global:pulumiresources += $resource return $resource } } class ArmServiceTypeHealthPolicy { [int] $maxPercentUnhealthyReplicasPerPartition [int] $maxPercentUnhealthyPartitionsPerService [int] $maxPercentUnhealthyServices } function New-AzureNativeTypeServicefabricArmServiceTypeHealthPolicy { param ( [parameter(mandatory=$False,HelpMessage='The maximum percentage of replicas per partition allowed to be unhealthy before your application is considered in error. )')] [int] $maxPercentUnhealthyReplicasPerPartition, [parameter(mandatory=$False,HelpMessage='The maximum percentage of partitions per service allowed to be unhealthy before your application is considered in error. )')] [int] $maxPercentUnhealthyPartitionsPerService, [parameter(mandatory=$False,HelpMessage='The maximum percentage of services allowed to be unhealthy before your application is considered in error. )')] [int] $maxPercentUnhealthyServices ) process { return $([ArmServiceTypeHealthPolicy]$PSBoundParameters) } } class ArmApplicationHealthPolicy { [ArmServiceTypeHealthPolicy] $defaultServiceTypeHealthPolicy [object] $serviceTypeHealthPolicyMap [bool] $considerWarningAsError [int] $maxPercentUnhealthyDeployedApplications } function New-AzureNativeTypeServicefabricArmApplicationHealthPolicy { param ( [parameter(mandatory=$False,HelpMessage='The health policy used by default to evaluate the health of a service type.)')] [ArmServiceTypeHealthPolicy] $defaultServiceTypeHealthPolicy, [parameter(mandatory=$False,HelpMessage='The map with service type health policy per service type name. The map is empty by default.)')] [ArmServiceTypeHealthPolicy] $serviceTypeHealthPolicyMap, [parameter(mandatory=$False,HelpMessage='Indicates whether warnings are treated with the same severity as errors.)')] [bool] $considerWarningAsError, [parameter(mandatory=$False,HelpMessage='The maximum allowed percentage of unhealthy deployed applications. Allowed values are Byte values from zero to 100. The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before the application is considered in error. This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the application is currently deployed on in the cluster. The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. )')] [int] $maxPercentUnhealthyDeployedApplications ) process { return $([ArmApplicationHealthPolicy]$PSBoundParameters) } } class ArmRollingUpgradeMonitoringPolicy { [string] $upgradeTimeout [string] $healthCheckStableDuration [string] $healthCheckWaitDuration [string] $upgradeDomainTimeout [ArgumentCompletions('Rollback', 'Manual')] [string] $failureAction [string] $healthCheckRetryTimeout } function New-AzureNativeTypeServicefabricArmRollingUpgradeMonitoringPolicy { param ( [parameter(mandatory=$False,HelpMessage='The amount of time the overall upgrade has to complete before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds.)')] [string] $upgradeTimeout, [parameter(mandatory=$False,HelpMessage='The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds.)')] [string] $healthCheckStableDuration, [parameter(mandatory=$False,HelpMessage='The amount of time to wait after completing an upgrade domain before applying health policies. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds.)')] [string] $healthCheckWaitDuration, [parameter(mandatory=$False,HelpMessage='The amount of time each upgrade domain has to complete before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds.)')] [string] $upgradeDomainTimeout, [parameter(mandatory=$False,HelpMessage='The activation Mode of the service package)')] [string] [ArgumentCompletions('Rollback', 'Manual')] $failureAction, [parameter(mandatory=$False,HelpMessage='The amount of time to retry health evaluation when the application or cluster is unhealthy before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds.)')] [string] $healthCheckRetryTimeout ) process { return $([ArmRollingUpgradeMonitoringPolicy]$PSBoundParameters) } } class ApplicationUpgradePolicy { [bool] $forceRestart [bool] $recreateApplication [string] $upgradeReplicaSetCheckTimeout [ArgumentCompletions('Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored')] [string] $upgradeMode [ArmApplicationHealthPolicy] $applicationHealthPolicy [ArmRollingUpgradeMonitoringPolicy] $rollingUpgradeMonitoringPolicy } function New-AzureNativeTypeServicefabricApplicationUpgradePolicy { param ( [parameter(mandatory=$False,HelpMessage='If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data).)')] [bool] $forceRestart, [parameter(mandatory=$False,HelpMessage='Determines whether the application should be recreated on update. If value=true, the rest of the upgrade policy parameters are not allowed and it will result in availability loss.)')] [bool] $recreateApplication, [parameter(mandatory=$False,HelpMessage='The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer).)')] [string] $upgradeReplicaSetCheckTimeout, [parameter(mandatory=$False,HelpMessage='The mode used to monitor health during a rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and Monitored.)')] [string] [ArgumentCompletions('Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored')] $upgradeMode, [parameter(mandatory=$False,HelpMessage='Defines a health policy used to evaluate the health of an application or one of its children entities. )')] [ArmApplicationHealthPolicy] $applicationHealthPolicy, [parameter(mandatory=$False,HelpMessage='The policy used for monitoring the application upgrade)')] [ArmRollingUpgradeMonitoringPolicy] $rollingUpgradeMonitoringPolicy ) process { return $([ApplicationUpgradePolicy]$PSBoundParameters) } } class ManagedIdentity { [ArgumentCompletions('SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None')] [object] $type [object] $userAssignedIdentities } function New-AzureNativeTypeServicefabricManagedIdentity { param ( [parameter(mandatory=$False,HelpMessage='The type of managed identity for the resource.)')] $type, [parameter(mandatory=$False,HelpMessage='The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: ''/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}''. )')] [object] $userAssignedIdentities ) process { return $([ManagedIdentity]$PSBoundParameters) } } function New-AzureNativeServicefabricApplication { [Alias('azure_native_servicefabric_application')] param ( [parameter(mandatory=$False,HelpMessage='The name of the application resource.)')] [string] $applicationName, [parameter(mandatory=$False,HelpMessage='Describes the policy for a monitored application upgrade.)')] [ApplicationUpgradePolicy] $upgradePolicy, [parameter(mandatory=$False,HelpMessage='The version of the application type as defined in the application manifest.)')] [string] $typeVersion, [parameter(mandatory=$False,HelpMessage='List of user assigned identities for the application, each mapped to a friendly name.)')] $managedIdentities, [parameter(mandatory=$False,HelpMessage='List of application parameters with overridden values from their default values specified in the application manifest.)')] [hashtable] $parameters, [parameter(mandatory=$False,HelpMessage='Remove the current application capacity settings.)')] [bool] $removeApplicationCapacity, [parameter(mandatory=$False,HelpMessage='It will be deprecated in New API, resource location depends on the parent resource.)')] [string] $location, [parameter(mandatory=$False,HelpMessage='The application type name as defined in the application manifest.)')] [string] $typeName, [parameter(mandatory=$False,HelpMessage='Azure resource tags.)')] [hashtable] $tags, [parameter(mandatory=$False,HelpMessage='The maximum number of nodes where Service Fabric will reserve capacity for this application. Note that this does not mean that the services of this application will be placed on all of those nodes. By default, the value of this property is zero and it means that the services can be placed on any node.)')] [int] $maximumNodes, [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='Describes the managed identities for an Azure resource.)')] [ManagedIdentity] $identity, [parameter(mandatory=$False,HelpMessage='The name of the cluster resource.)')] [string] $clusterName, [parameter(mandatory=$False,HelpMessage='List of application capacity metric description.)')] $metrics, [parameter(mandatory=$False,HelpMessage='The minimum number of nodes where Service Fabric will reserve capacity for this application. Note that this does not mean that the services of this application will be placed on all of those nodes. If this property is set to zero, no capacity will be reserved. The value of this property cannot be more than the value of the MaximumNodes property.)')] [int] $minimumNodes, [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:servicefabric:Application") $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["clusterName"] = $clusterName $resource.properties["resourceGroupName"] = $resourceGroupName if($PSBoundParameters.Keys -icontains 'applicationName') { $resource.properties["applicationName"] = $applicationName } if($PSBoundParameters.Keys -icontains 'upgradePolicy') { $resource.properties["upgradePolicy"] = $upgradePolicy } if($PSBoundParameters.Keys -icontains 'typeVersion') { $resource.properties["typeVersion"] = $typeVersion } if($PSBoundParameters.Keys -icontains 'managedIdentities') { $resource.properties["managedIdentities"] = $managedIdentities } if($PSBoundParameters.Keys -icontains 'parameters') { $resource.properties["parameters"] = $parameters } if($PSBoundParameters.Keys -icontains 'removeApplicationCapacity') { $resource.properties["removeApplicationCapacity"] = $removeApplicationCapacity } if($PSBoundParameters.Keys -icontains 'location') { $resource.properties["location"] = $location } if($PSBoundParameters.Keys -icontains 'typeName') { $resource.properties["typeName"] = $typeName } if($PSBoundParameters.Keys -icontains 'tags') { $resource.properties["tags"] = $tags } if($PSBoundParameters.Keys -icontains 'maximumNodes') { $resource.properties["maximumNodes"] = $maximumNodes } if($PSBoundParameters.Keys -icontains 'identity') { $resource.properties["identity"] = $identity } if($PSBoundParameters.Keys -icontains 'metrics') { $resource.properties["metrics"] = $metrics } if($PSBoundParameters.Keys -icontains 'minimumNodes') { $resource.properties["minimumNodes"] = $minimumNodes } $global:pulumiresources += $resource return $resource } } class EndpointRangeDescription { [int] $startPort [int] $endPort } function New-AzureNativeTypeServicefabricEndpointRangeDescription { param ( [parameter(mandatory=$False,HelpMessage='Starting port of a range of ports)')] [int] $startPort, [parameter(mandatory=$False,HelpMessage='End port of a range of ports)')] [int] $endPort ) process { return $([EndpointRangeDescription]$PSBoundParameters) } } function New-AzureNativeServicefabricNodeType { [Alias('azure_native_servicefabric_nodetype')] param ( [parameter(mandatory=$False,HelpMessage='The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how much resource a node has.)')] [hashtable] $capacities, [parameter(mandatory=$False,HelpMessage='The name of the cluster resource.)')] [string] $clusterName, [parameter(mandatory=$False,HelpMessage='The version of the Azure Virtual Machines Marketplace image. A value of ''latest'' can be specified to select the latest version of an image. If omitted, the default is ''latest''.)')] [string] $vmImageVersion, [parameter(mandatory=$False,HelpMessage='Disk size for each vm in the node type in GBs.)')] [int] $dataDiskSizeGB, [parameter(mandatory=$False,HelpMessage='The size of virtual machines in the pool. All virtual machines in a pool are the same size. For example, Standard_D3.)')] [string] $vmSize, [parameter(mandatory=$False,HelpMessage='The number of nodes in the node type.)')] [int] $vmInstanceCount, [parameter(mandatory=$False,HelpMessage='The secrets to install in the virtual machines.)')] $vmSecrets, [parameter(mandatory=$False,HelpMessage='Azure resource tags.)')] [hashtable] $tags, [parameter(mandatory=$False,HelpMessage='The range of ports from which cluster assigned port to Service Fabric applications.)')] [EndpointRangeDescription] $applicationPorts, [parameter(mandatory=$False,HelpMessage='The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer.)')] [string] $vmImageOffer, [parameter(mandatory=$False,HelpMessage='The node type on which system services will run. Only one node type should be marked as primary. Primary node type cannot be deleted or changed for existing clusters.)')] [bool] $isPrimary, [parameter(mandatory=$False,HelpMessage='The name of the node type.)')] [string] $nodeTypeName, [parameter(mandatory=$False,HelpMessage='Set of extensions that should be installed onto the virtual machines.)')] $vmExtensions, [parameter(mandatory=$False,HelpMessage='The range of ephemeral ports that nodes in this node type should be configured with.)')] [EndpointRangeDescription] $ephemeralPorts, [parameter(mandatory=$False,HelpMessage='The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer.)')] [string] $vmImagePublisher, [parameter(mandatory=$False,HelpMessage='The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run.)')] [hashtable] $placementProperties, [parameter(mandatory=$False,HelpMessage='The SKU of the Azure Virtual Machines Marketplace image. For example, 14.04.0-LTS or 2012-R2-Datacenter.)')] [string] $vmImageSku, [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')] [string] $resourceGroupName, [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:servicefabric:NodeType") $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["clusterName"] = $clusterName $resource.properties["dataDiskSizeGB"] = $dataDiskSizeGB $resource.properties["isPrimary"] = $isPrimary $resource.properties["resourceGroupName"] = $resourceGroupName $resource.properties["vmInstanceCount"] = $vmInstanceCount if($PSBoundParameters.Keys -icontains 'capacities') { $resource.properties["capacities"] = $capacities } if($PSBoundParameters.Keys -icontains 'vmImageVersion') { $resource.properties["vmImageVersion"] = $vmImageVersion } if($PSBoundParameters.Keys -icontains 'vmSize') { $resource.properties["vmSize"] = $vmSize } if($PSBoundParameters.Keys -icontains 'vmSecrets') { $resource.properties["vmSecrets"] = $vmSecrets } if($PSBoundParameters.Keys -icontains 'tags') { $resource.properties["tags"] = $tags } if($PSBoundParameters.Keys -icontains 'applicationPorts') { $resource.properties["applicationPorts"] = $applicationPorts } if($PSBoundParameters.Keys -icontains 'vmImageOffer') { $resource.properties["vmImageOffer"] = $vmImageOffer } if($PSBoundParameters.Keys -icontains 'nodeTypeName') { $resource.properties["nodeTypeName"] = $nodeTypeName } if($PSBoundParameters.Keys -icontains 'vmExtensions') { $resource.properties["vmExtensions"] = $vmExtensions } if($PSBoundParameters.Keys -icontains 'ephemeralPorts') { $resource.properties["ephemeralPorts"] = $ephemeralPorts } if($PSBoundParameters.Keys -icontains 'vmImagePublisher') { $resource.properties["vmImagePublisher"] = $vmImagePublisher } if($PSBoundParameters.Keys -icontains 'placementProperties') { $resource.properties["placementProperties"] = $placementProperties } if($PSBoundParameters.Keys -icontains 'vmImageSku') { $resource.properties["vmImageSku"] = $vmImageSku } $global:pulumiresources += $resource return $resource } } |