pspulumiyaml.azurenative.keyvault.psm1
|
using module pspulumiyaml function Invoke-AzureNativeFunctionKeyvaultGetPrivateEndpointConnection { param ( [parameter(mandatory=$False,HelpMessage='The name of the key vault.)')] [string] $vaultName, [parameter(mandatory=$False,HelpMessage='Name of the private endpoint connection associated with the key vault.)')] [string] $privateEndpointConnectionName, [parameter(mandatory=$False,HelpMessage='Name of the resource group that contains the key vault.)')] [string] $resourceGroupName ) process { $arguments = @{} $arguments["privateEndpointConnectionName"] = $privateEndpointConnectionName $arguments["resourceGroupName"] = $resourceGroupName $arguments["vaultName"] = $vaultName $functionObject = Invoke-PulumiFunction -Name azure-native:keyvault:getPrivateEndpointConnection -variableName $([guid]::NewGuid().Guid) -Arguments $arguments return $functionObject } } function Invoke-AzureNativeFunctionKeyvaultGetSecret { param ( [parameter(mandatory=$False,HelpMessage='The name of the vault.)')] [string] $vaultName, [parameter(mandatory=$False,HelpMessage='The name of the secret.)')] [string] $secretName, [parameter(mandatory=$False,HelpMessage='The name of the Resource Group to which the vault belongs.)')] [string] $resourceGroupName ) process { $arguments = @{} $arguments["resourceGroupName"] = $resourceGroupName $arguments["secretName"] = $secretName $arguments["vaultName"] = $vaultName $functionObject = Invoke-PulumiFunction -Name azure-native:keyvault:getSecret -variableName $([guid]::NewGuid().Guid) -Arguments $arguments return $functionObject } } function Invoke-AzureNativeFunctionKeyvaultGetManagedHsm { param ( [parameter(mandatory=$False,HelpMessage='The name of the managed HSM Pool.)')] [string] $name, [parameter(mandatory=$False,HelpMessage='Name of the resource group that contains the managed HSM pool.)')] [string] $resourceGroupName ) process { $arguments = @{} $arguments["name"] = $name $arguments["resourceGroupName"] = $resourceGroupName $functionObject = Invoke-PulumiFunction -Name azure-native:keyvault:getManagedHsm -variableName $([guid]::NewGuid().Guid) -Arguments $arguments return $functionObject } } function Invoke-AzureNativeFunctionKeyvaultGetVault { param ( [parameter(mandatory=$False,HelpMessage='The name of the Resource Group to which the vault belongs.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='The name of the vault.)')] [string] $vaultName ) process { $arguments = @{} $arguments["resourceGroupName"] = $resourceGroupName $arguments["vaultName"] = $vaultName $functionObject = Invoke-PulumiFunction -Name azure-native:keyvault:getVault -variableName $([guid]::NewGuid().Guid) -Arguments $arguments return $functionObject } } function Invoke-AzureNativeFunctionKeyvaultGetMHSMPrivateEndpointConnection { param ( [parameter(mandatory=$False,HelpMessage='Name of the private endpoint connection associated with the managed hsm pool.)')] [string] $privateEndpointConnectionName, [parameter(mandatory=$False,HelpMessage='Name of the managed HSM Pool)')] [string] $name, [parameter(mandatory=$False,HelpMessage='Name of the resource group that contains the managed HSM pool.)')] [string] $resourceGroupName ) process { $arguments = @{} $arguments["name"] = $name $arguments["privateEndpointConnectionName"] = $privateEndpointConnectionName $arguments["resourceGroupName"] = $resourceGroupName $functionObject = Invoke-PulumiFunction -Name azure-native:keyvault:getMHSMPrivateEndpointConnection -variableName $([guid]::NewGuid().Guid) -Arguments $arguments return $functionObject } } function Invoke-AzureNativeFunctionKeyvaultGetKey { param ( [parameter(mandatory=$False,HelpMessage='The name of the vault which contains the key to be retrieved.)')] [string] $vaultName, [parameter(mandatory=$False,HelpMessage='The name of the key to be retrieved.)')] [string] $keyName, [parameter(mandatory=$False,HelpMessage='The name of the resource group which contains the specified key vault.)')] [string] $resourceGroupName ) process { $arguments = @{} $arguments["keyName"] = $keyName $arguments["resourceGroupName"] = $resourceGroupName $arguments["vaultName"] = $vaultName $functionObject = Invoke-PulumiFunction -Name azure-native:keyvault:getKey -variableName $([guid]::NewGuid().Guid) -Arguments $arguments return $functionObject } } class KeyAttributes { [int] $notBefore [bool] $enabled [int] $expires } function New-AzureNativeTypeKeyvaultKeyAttributes { param ( [parameter(mandatory=$False,HelpMessage='Not before date in seconds since 1970-01-01T00:00:00Z.)')] [int] $notBefore, [parameter(mandatory=$False,HelpMessage='Determines whether or not the object is enabled.)')] [bool] $enabled, [parameter(mandatory=$False,HelpMessage='Expiry date in seconds since 1970-01-01T00:00:00Z.)')] [int] $expires ) process { return $([KeyAttributes]$PSBoundParameters) } } class KeyProperties { [KeyAttributes] $attributes [ArgumentCompletions('EC', 'EC-HSM', 'RSA', 'RSA-HSM')] [string] $kty [int] $keySize [ArgumentCompletions('P-256', 'P-384', 'P-521', 'P-256K')] [string] $curveName [string[]] $keyOps } function New-AzureNativeTypeKeyvaultKeyProperties { param ( [parameter(mandatory=$False,HelpMessage='The attributes of the key.)')] [KeyAttributes] $attributes, [parameter(mandatory=$False,HelpMessage='The type of the key. For valid values, see JsonWebKeyType.)')] [string] [ValidateSet('EC', 'EC-HSM', 'RSA', 'RSA-HSM')] $kty, [parameter(mandatory=$False,HelpMessage='The key size in bits. For example: 2048, 3072, or 4096 for RSA.)')] [int] $keySize, [parameter(mandatory=$False,HelpMessage='The elliptic curve name. For valid values, see JsonWebKeyCurveName.)')] [string] [ValidateSet('P-256', 'P-384', 'P-521', 'P-256K')] $curveName, [parameter(mandatory=$False,HelpMessage=')')] $keyOps ) process { return $([KeyProperties]$PSBoundParameters) } } function New-AzureNativeKeyvaultKey { [Alias('azure_native_keyvault_key')] param ( [parameter(mandatory=$False,HelpMessage='The name of the key vault which contains the key to be created.)')] [string] $vaultName, [parameter(mandatory=$False,HelpMessage='The properties of the key to be created.)')] [KeyProperties] $properties, [parameter(mandatory=$False,HelpMessage='The name of the key to be created.)')] [string] $keyName, [parameter(mandatory=$False,HelpMessage='The tags that will be assigned to the key.)')] [hashtable] $tags, [parameter(mandatory=$False,HelpMessage='The name of the resource group which contains the specified key vault.)')] [string] $resourceGroupName, [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')] [string] $pulumiid, [parameter(mandatory,HelpMessage='Pass in the resources you make to make this resource dependant on')] [object] $DependsOn ) process { $resource = [pulumiresource]::new($pulumiid, "azure-native:keyvault:Key") foreach($Dependency in $DependsOn) { if($Dependency -is [pulumiresource]) { $resource.dependson += $Dependency.Reference() } else { $resource.dependson += $Dependency } } $resource.properties["properties"] = $properties $resource.properties["resourceGroupName"] = $resourceGroupName $resource.properties["vaultName"] = $vaultName if($PSBoundParameters.Keys -icontains 'keyName') { $resource.properties["keyName"] = $keyName } if($PSBoundParameters.Keys -icontains 'tags') { $resource.properties["tags"] = $tags } $global:pulumiresources += $resource return $resource } } class SecretAttributes { [int] $notBefore [bool] $enabled [int] $expires } function New-AzureNativeTypeKeyvaultSecretAttributes { param ( [parameter(mandatory=$False,HelpMessage='Not before date in seconds since 1970-01-01T00:00:00Z.)')] [int] $notBefore, [parameter(mandatory=$False,HelpMessage='Determines whether the object is enabled.)')] [bool] $enabled, [parameter(mandatory=$False,HelpMessage='Expiry date in seconds since 1970-01-01T00:00:00Z.)')] [int] $expires ) process { return $([SecretAttributes]$PSBoundParameters) } } class SecretProperties { [string] $value [SecretAttributes] $attributes [string] $contentType } function New-AzureNativeTypeKeyvaultSecretProperties { param ( [parameter(mandatory=$False,HelpMessage='The value of the secret. NOTE: ''value'' will never be returned from the service, as APIs using this model are is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets.)')] [string] $value, [parameter(mandatory=$False,HelpMessage='The attributes of the secret.)')] [SecretAttributes] $attributes, [parameter(mandatory=$False,HelpMessage='The content type of the secret.)')] [string] $contentType ) process { return $([SecretProperties]$PSBoundParameters) } } function New-AzureNativeKeyvaultSecret { [Alias('azure_native_keyvault_secret')] param ( [parameter(mandatory=$False,HelpMessage='Name of the vault)')] [string] $vaultName, [parameter(mandatory=$False,HelpMessage='Properties of the secret)')] [SecretProperties] $properties, [parameter(mandatory=$False,HelpMessage='Name of the secret)')] [string] $secretName, [parameter(mandatory=$False,HelpMessage='The tags that will be assigned to the secret. )')] [hashtable] $tags, [parameter(mandatory=$False,HelpMessage='The name of the Resource Group to which the vault belongs.)')] [string] $resourceGroupName, [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')] [string] $pulumiid, [parameter(mandatory,HelpMessage='Pass in the resources you make to make this resource dependant on')] [object] $DependsOn ) process { $resource = [pulumiresource]::new($pulumiid, "azure-native:keyvault:Secret") foreach($Dependency in $DependsOn) { if($Dependency -is [pulumiresource]) { $resource.dependson += $Dependency.Reference() } else { $resource.dependson += $Dependency } } $resource.properties["properties"] = $properties $resource.properties["resourceGroupName"] = $resourceGroupName $resource.properties["vaultName"] = $vaultName if($PSBoundParameters.Keys -icontains 'secretName') { $resource.properties["secretName"] = $secretName } if($PSBoundParameters.Keys -icontains 'tags') { $resource.properties["tags"] = $tags } $global:pulumiresources += $resource return $resource } } class VirtualNetworkRule { [bool] $ignoreMissingVnetServiceEndpoint [string] $id } function New-AzureNativeTypeKeyvaultVirtualNetworkRule { param ( [parameter(mandatory=$False,HelpMessage='Property to specify whether NRP will ignore the check if parent subnet has serviceEndpoints configured.)')] [bool] $ignoreMissingVnetServiceEndpoint, [parameter(mandatory=$False,HelpMessage='Full resource id of a vnet subnet, such as ''/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1''.)')] [string] $id ) process { return $([VirtualNetworkRule]$PSBoundParameters) } } class IPRule { [string] $value } function New-AzureNativeTypeKeyvaultIPRule { param ( [parameter(mandatory=$False,HelpMessage='An IPv4 address range in CIDR notation, such as ''124.56.78.91'' (simple IP address) or ''124.56.78.0/24'' (all addresses that start with 124.56.78).)')] [string] $value ) process { return $([IPRule]$PSBoundParameters) } } class NetworkRuleSet { [ArgumentCompletions('AzureServices', 'None')] [string] $bypass [ArgumentCompletions('Allow', 'Deny')] [string] $defaultAction [VirtualNetworkRule[]] $virtualNetworkRules [IPRule[]] $ipRules } function New-AzureNativeTypeKeyvaultNetworkRuleSet { param ( [parameter(mandatory=$False,HelpMessage='Tells what traffic can bypass network rules. This can be ''AzureServices'' or ''None''. If not specified the default is ''AzureServices''.)')] [string] [ValidateSet('AzureServices', 'None')] $bypass, [parameter(mandatory=$False,HelpMessage='The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated.)')] [string] [ValidateSet('Allow', 'Deny')] $defaultAction, [parameter(mandatory=$False,HelpMessage='The list of virtual network rules.)')] $virtualNetworkRules, [parameter(mandatory=$False,HelpMessage='The list of IP address rules.)')] $ipRules ) process { return $([NetworkRuleSet]$PSBoundParameters) } } class Sku { [ArgumentCompletions('A')] [string] $family [ArgumentCompletions('standard', 'premium')] [object] $name } function New-AzureNativeTypeKeyvaultSku { param ( [parameter(mandatory=$False,HelpMessage='SKU family name)')] [string] [ValidateSet('A')] $family, [parameter(mandatory=$False,HelpMessage='SKU name to specify whether the key vault is a standard vault or a premium vault.)')] $name ) process { return $([Sku]$PSBoundParameters) } } class Permissions { [string[]] $secrets [string[]] $certificates [string[]] $storage [string[]] $keys } function New-AzureNativeTypeKeyvaultPermissions { param ( [parameter(mandatory=$False,HelpMessage='Permissions to secrets)')] $secrets, [parameter(mandatory=$False,HelpMessage='Permissions to certificates)')] $certificates, [parameter(mandatory=$False,HelpMessage='Permissions to storage accounts)')] $storage, [parameter(mandatory=$False,HelpMessage='Permissions to keys)')] $keys ) process { return $([Permissions]$PSBoundParameters) } } class AccessPolicyEntry { [Permissions] $permissions [string] $tenantId [string] $objectId [string] $applicationId } function New-AzureNativeTypeKeyvaultAccessPolicyEntry { param ( [parameter(mandatory=$False,HelpMessage='Permissions the identity has for keys, secrets and certificates.)')] [Permissions] $permissions, [parameter(mandatory=$False,HelpMessage='The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault.)')] [string] $tenantId, [parameter(mandatory=$False,HelpMessage='The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID must be unique for the list of access policies.)')] [string] $objectId, [parameter(mandatory=$False,HelpMessage=' Application ID of the client making request on behalf of a principal)')] [string] $applicationId ) process { return $([AccessPolicyEntry]$PSBoundParameters) } } class VaultProperties { [NetworkRuleSet] $networkAcls [bool] $enabledForDiskEncryption [ArgumentCompletions('Succeeded', 'RegisteringDns')] [string] $provisioningState [ArgumentCompletions('recover', 'default')] [object] $createMode [Sku] $sku [bool] $enableSoftDelete [string] $vaultUri [AccessPolicyEntry[]] $accessPolicies [string] $tenantId [bool] $enabledForTemplateDeployment [int] $softDeleteRetentionInDays [bool] $enabledForDeployment [bool] $enableRbacAuthorization [bool] $enablePurgeProtection } function New-AzureNativeTypeKeyvaultVaultProperties { param ( [parameter(mandatory=$False,HelpMessage='Rules governing the accessibility of the key vault from specific network locations.)')] [NetworkRuleSet] $networkAcls, [parameter(mandatory=$False,HelpMessage='Property to specify whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys.)')] [bool] $enabledForDiskEncryption, [parameter(mandatory=$False,HelpMessage='Provisioning state of the vault.)')] [string] [ValidateSet('Succeeded', 'RegisteringDns')] $provisioningState, [parameter(mandatory=$False,HelpMessage='The vault''s create mode to indicate whether the vault need to be recovered or not.)')] $createMode, [parameter(mandatory=$False,HelpMessage='SKU details)')] [Sku] $sku, [parameter(mandatory=$False,HelpMessage='Property to specify whether the ''soft delete'' functionality is enabled for this key vault. If it''s not set to any value(true or false) when creating new key vault, it will be set to true by default. Once set to true, it cannot be reverted to false.)')] [bool] $enableSoftDelete, [parameter(mandatory=$False,HelpMessage='The URI of the vault for performing operations on keys and secrets. This property is readonly)')] [string] $vaultUri, [parameter(mandatory=$False,HelpMessage='An array of 0 to 1024 identities that have access to the key vault. All identities in the array must use the same tenant ID as the key vault''s tenant ID. When `createMode` is set to `recover`, access policies are not required. Otherwise, access policies are required.)')] $accessPolicies, [parameter(mandatory=$False,HelpMessage='The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault.)')] [string] $tenantId, [parameter(mandatory=$False,HelpMessage='Property to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault.)')] [bool] $enabledForTemplateDeployment, [parameter(mandatory=$False,HelpMessage='softDelete data retention days. It accepts >=7 and <=90.)')] [int] $softDeleteRetentionInDays, [parameter(mandatory=$False,HelpMessage='Property to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key vault.)')] [bool] $enabledForDeployment, [parameter(mandatory=$False,HelpMessage='Property that controls how data actions are authorized. When true, the key vault will use Role Based Access Control (RBAC) for authorization of data actions, and the access policies specified in vault properties will be ignored. When false, the key vault will use the access policies specified in vault properties, and any policy stored on Azure Resource Manager will be ignored. If null or not specified, the vault is created with the default value of false. Note that management actions are always authorized with RBAC.)')] [bool] $enableRbacAuthorization, [parameter(mandatory=$False,HelpMessage='Property specifying whether protection against purge is enabled for this vault. Setting this property to true activates protection against purge for this vault and its content - only the Key Vault service may initiate a hard, irrecoverable deletion. The setting is effective only if soft delete is also enabled. Enabling this functionality is irreversible - that is, the property does not accept false as its value.)')] [bool] $enablePurgeProtection ) process { return $([VaultProperties]$PSBoundParameters) } } function New-AzureNativeKeyvaultVault { [Alias('azure_native_keyvault_vault')] param ( [parameter(mandatory=$False,HelpMessage='The supported Azure location where the key vault should be created.)')] [string] $location, [parameter(mandatory=$False,HelpMessage='Properties of the vault)')] [VaultProperties] $properties, [parameter(mandatory=$False,HelpMessage='Name of the vault)')] [string] $vaultName, [parameter(mandatory=$False,HelpMessage='The tags that will be assigned to the key vault.)')] [hashtable] $tags, [parameter(mandatory=$False,HelpMessage='The name of the Resource Group to which the server belongs.)')] [string] $resourceGroupName, [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')] [string] $pulumiid, [parameter(mandatory,HelpMessage='Pass in the resources you make to make this resource dependant on')] [object] $DependsOn ) process { $resource = [pulumiresource]::new($pulumiid, "azure-native:keyvault:Vault") foreach($Dependency in $DependsOn) { if($Dependency -is [pulumiresource]) { $resource.dependson += $Dependency.Reference() } else { $resource.dependson += $Dependency } } $resource.properties["properties"] = $properties $resource.properties["resourceGroupName"] = $resourceGroupName if($PSBoundParameters.Keys -icontains 'location') { $resource.properties["location"] = $location } if($PSBoundParameters.Keys -icontains 'vaultName') { $resource.properties["vaultName"] = $vaultName } if($PSBoundParameters.Keys -icontains 'tags') { $resource.properties["tags"] = $tags } $global:pulumiresources += $resource return $resource } } class PrivateLinkServiceConnectionState { [string] $actionsRequired [string] $description [ArgumentCompletions('Pending', 'Approved', 'Rejected', 'Disconnected')] [string] $status } function New-AzureNativeTypeKeyvaultPrivateLinkServiceConnectionState { param ( [parameter(mandatory=$False,HelpMessage='A message indicating if changes on the service provider require any updates on the consumer.)')] [string] $actionsRequired, [parameter(mandatory=$False,HelpMessage='The reason for approval or rejection.)')] [string] $description, [parameter(mandatory=$False,HelpMessage='Indicates whether the connection has been approved, rejected or removed by the key vault owner.)')] [string] [ValidateSet('Pending', 'Approved', 'Rejected', 'Disconnected')] $status ) process { return $([PrivateLinkServiceConnectionState]$PSBoundParameters) } } function New-AzureNativeKeyvaultPrivateEndpointConnection { [Alias('azure_native_keyvault_privateendpointconnection')] param ( [parameter(mandatory=$False,HelpMessage='The name of the key vault.)')] [string] $vaultName, [parameter(mandatory=$False,HelpMessage='Approval state of the private link connection.)')] [PrivateLinkServiceConnectionState] $privateLinkServiceConnectionState, [parameter(mandatory=$False,HelpMessage='Name of the private endpoint connection associated with the key vault.)')] [string] $privateEndpointConnectionName, [parameter(mandatory=$False,HelpMessage='Name of the resource group that contains the key vault.)')] [string] $resourceGroupName, [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')] [string] $pulumiid, [parameter(mandatory,HelpMessage='Pass in the resources you make to make this resource dependant on')] [object] $DependsOn ) process { $resource = [pulumiresource]::new($pulumiid, "azure-native:keyvault:PrivateEndpointConnection") foreach($Dependency in $DependsOn) { if($Dependency -is [pulumiresource]) { $resource.dependson += $Dependency.Reference() } else { $resource.dependson += $Dependency } } $resource.properties["resourceGroupName"] = $resourceGroupName $resource.properties["vaultName"] = $vaultName if($PSBoundParameters.Keys -icontains 'privateLinkServiceConnectionState') { $resource.properties["privateLinkServiceConnectionState"] = $privateLinkServiceConnectionState } if($PSBoundParameters.Keys -icontains 'privateEndpointConnectionName') { $resource.properties["privateEndpointConnectionName"] = $privateEndpointConnectionName } $global:pulumiresources += $resource return $resource } } class MHSMPrivateLinkServiceConnectionState { [ArgumentCompletions('None')] [string] $actionsRequired [string] $description [ArgumentCompletions('Pending', 'Approved', 'Rejected', 'Disconnected')] [string] $status } function New-AzureNativeTypeKeyvaultMHSMPrivateLinkServiceConnectionState { param ( [parameter(mandatory=$False,HelpMessage='A message indicating if changes on the service provider require any updates on the consumer.)')] [string] [ValidateSet('None')] $actionsRequired, [parameter(mandatory=$False,HelpMessage='The reason for approval or rejection.)')] [string] $description, [parameter(mandatory=$False,HelpMessage='Indicates whether the connection has been approved, rejected or removed by the key vault owner.)')] [string] [ValidateSet('Pending', 'Approved', 'Rejected', 'Disconnected')] $status ) process { return $([MHSMPrivateLinkServiceConnectionState]$PSBoundParameters) } } class ManagedHsmSku { [ArgumentCompletions('B')] [string] $family [ArgumentCompletions('Standard_B1', 'Custom_B32')] [object] $name } function New-AzureNativeTypeKeyvaultManagedHsmSku { param ( [parameter(mandatory=$False,HelpMessage='SKU Family of the managed HSM Pool)')] [string] [ValidateSet('B')] $family, [parameter(mandatory=$False,HelpMessage='SKU of the managed HSM Pool)')] $name ) process { return $([ManagedHsmSku]$PSBoundParameters) } } function New-AzureNativeKeyvaultMHSMPrivateEndpointConnection { [Alias('azure_native_keyvault_mhsmprivateendpointconnection')] param ( [parameter(mandatory=$False,HelpMessage='Name of the resource group that contains the managed HSM pool.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='Approval state of the private link connection.)')] [MHSMPrivateLinkServiceConnectionState] $privateLinkServiceConnectionState, [parameter(mandatory=$False,HelpMessage='Resource tags)')] [hashtable] $tags, [parameter(mandatory=$False,HelpMessage='Name of the managed HSM Pool)')] [string] $name, [parameter(mandatory=$False,HelpMessage='Name of the private endpoint connection associated with the managed hsm pool.)')] [string] $privateEndpointConnectionName, [parameter(mandatory=$False,HelpMessage='SKU details)')] [ManagedHsmSku] $sku, [parameter(mandatory=$False,HelpMessage='The supported Azure location where the managed HSM Pool should be created.)')] [string] $location, [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')] [string] $pulumiid, [parameter(mandatory,HelpMessage='Pass in the resources you make to make this resource dependant on')] [object] $DependsOn ) process { $resource = [pulumiresource]::new($pulumiid, "azure-native:keyvault:MHSMPrivateEndpointConnection") foreach($Dependency in $DependsOn) { if($Dependency -is [pulumiresource]) { $resource.dependson += $Dependency.Reference() } else { $resource.dependson += $Dependency } } $resource.properties["name"] = $name $resource.properties["resourceGroupName"] = $resourceGroupName if($PSBoundParameters.Keys -icontains 'privateLinkServiceConnectionState') { $resource.properties["privateLinkServiceConnectionState"] = $privateLinkServiceConnectionState } if($PSBoundParameters.Keys -icontains 'tags') { $resource.properties["tags"] = $tags } if($PSBoundParameters.Keys -icontains 'privateEndpointConnectionName') { $resource.properties["privateEndpointConnectionName"] = $privateEndpointConnectionName } if($PSBoundParameters.Keys -icontains 'sku') { $resource.properties["sku"] = $sku } if($PSBoundParameters.Keys -icontains 'location') { $resource.properties["location"] = $location } $global:pulumiresources += $resource return $resource } } class MHSMVirtualNetworkRule { [string] $id } function New-AzureNativeTypeKeyvaultMHSMVirtualNetworkRule { param ( [parameter(mandatory=$False,HelpMessage='Full resource id of a vnet subnet, such as ''/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1''.)')] [string] $id ) process { return $([MHSMVirtualNetworkRule]$PSBoundParameters) } } class MHSMIPRule { [string] $value } function New-AzureNativeTypeKeyvaultMHSMIPRule { param ( [parameter(mandatory=$False,HelpMessage='An IPv4 address range in CIDR notation, such as ''124.56.78.91'' (simple IP address) or ''124.56.78.0/24'' (all addresses that start with 124.56.78).)')] [string] $value ) process { return $([MHSMIPRule]$PSBoundParameters) } } class MHSMNetworkRuleSet { [ArgumentCompletions('AzureServices', 'None')] [string] $bypass [ArgumentCompletions('Allow', 'Deny')] [string] $defaultAction [MHSMVirtualNetworkRule[]] $virtualNetworkRules [MHSMIPRule[]] $ipRules } function New-AzureNativeTypeKeyvaultMHSMNetworkRuleSet { param ( [parameter(mandatory=$False,HelpMessage='Tells what traffic can bypass network rules. This can be ''AzureServices'' or ''None''. If not specified the default is ''AzureServices''.)')] [string] [ValidateSet('AzureServices', 'None')] $bypass, [parameter(mandatory=$False,HelpMessage='The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated.)')] [string] [ValidateSet('Allow', 'Deny')] $defaultAction, [parameter(mandatory=$False,HelpMessage='The list of virtual network rules.)')] $virtualNetworkRules, [parameter(mandatory=$False,HelpMessage='The list of IP address rules.)')] $ipRules ) process { return $([MHSMNetworkRuleSet]$PSBoundParameters) } } class ManagedHsmProperties { [MHSMNetworkRuleSet] $networkAcls [ArgumentCompletions('recover', 'default')] [object] $createMode [string] $tenantId [int] $softDeleteRetentionInDays [string[]] $initialAdminObjectIds [ArgumentCompletions('Enabled', 'Disabled')] [string] $publicNetworkAccess [bool] $enablePurgeProtection [bool] $enableSoftDelete } function New-AzureNativeTypeKeyvaultManagedHsmProperties { param ( [parameter(mandatory=$False,HelpMessage='Rules governing the accessibility of the key vault from specific network locations.)')] [MHSMNetworkRuleSet] $networkAcls, [parameter(mandatory=$False,HelpMessage='The create mode to indicate whether the resource is being created or is being recovered from a deleted resource.)')] $createMode, [parameter(mandatory=$False,HelpMessage='The Azure Active Directory tenant ID that should be used for authenticating requests to the managed HSM pool.)')] [string] $tenantId, [parameter(mandatory=$False,HelpMessage='softDelete data retention days. It accepts >=7 and <=90.)')] [int] $softDeleteRetentionInDays, [parameter(mandatory=$False,HelpMessage='Array of initial administrators object ids for this managed hsm pool.)')] [string[]] $initialAdminObjectIds, [parameter(mandatory=$False,HelpMessage='Control permission for data plane traffic coming from public networks while private endpoint is enabled.)')] [string] [ValidateSet('Enabled', 'Disabled')] $publicNetworkAccess, [parameter(mandatory=$False,HelpMessage='Property specifying whether protection against purge is enabled for this managed HSM pool. Setting this property to true activates protection against purge for this managed HSM pool and its content - only the Managed HSM service may initiate a hard, irrecoverable deletion. The setting is effective only if soft delete is also enabled. Enabling this functionality is irreversible.)')] [bool] $enablePurgeProtection, [parameter(mandatory=$False,HelpMessage='Property to specify whether the ''soft delete'' functionality is enabled for this managed HSM pool. If it''s not set to any value(true or false) when creating new managed HSM pool, it will be set to true by default. Once set to true, it cannot be reverted to false.)')] [bool] $enableSoftDelete ) process { return $([ManagedHsmProperties]$PSBoundParameters) } } function New-AzureNativeKeyvaultManagedHsm { [Alias('azure_native_keyvault_managedhsm')] param ( [parameter(mandatory=$False,HelpMessage='Name of the resource group that contains the managed HSM pool.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='Resource tags)')] [hashtable] $tags, [parameter(mandatory=$False,HelpMessage='Properties of the managed HSM)')] [ManagedHsmProperties] $properties, [parameter(mandatory=$False,HelpMessage='Name of the managed HSM Pool)')] [string] $name, [parameter(mandatory=$False,HelpMessage='SKU details)')] [ManagedHsmSku] $sku, [parameter(mandatory=$False,HelpMessage='The supported Azure location where the managed HSM Pool should be created.)')] [string] $location, [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')] [string] $pulumiid, [parameter(mandatory,HelpMessage='Pass in the resources you make to make this resource dependant on')] [object] $DependsOn ) process { $resource = [pulumiresource]::new($pulumiid, "azure-native:keyvault:ManagedHsm") foreach($Dependency in $DependsOn) { if($Dependency -is [pulumiresource]) { $resource.dependson += $Dependency.Reference() } else { $resource.dependson += $Dependency } } $resource.properties["resourceGroupName"] = $resourceGroupName if($PSBoundParameters.Keys -icontains 'tags') { $resource.properties["tags"] = $tags } if($PSBoundParameters.Keys -icontains 'properties') { $resource.properties["properties"] = $properties } if($PSBoundParameters.Keys -icontains 'name') { $resource.properties["name"] = $name } if($PSBoundParameters.Keys -icontains 'sku') { $resource.properties["sku"] = $sku } if($PSBoundParameters.Keys -icontains 'location') { $resource.properties["location"] = $location } $global:pulumiresources += $resource return $resource } } |