New-AzCustomProvider

Creates or updates the custom resource provider.

Syntax

New-AzCustomProvider
   -Name <String>
   -ResourceGroupName <String>
   -Location <String>
   [-SubscriptionId <String>]
   [-Action <ICustomRpActionRouteDefinition[]>]
   [-ResourceType <ICustomRpResourceTypeRouteDefinition[]>]
   [-Tag <Hashtable>]
   [-Validation <ICustomRpValidations[]>]
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

Creates or updates the custom resource provider.

Examples

Example 1: Create a custom provider

New-AzCustomProvider -ResourceGroupName myRG -Name Namespace.Type -Location "West US 2" -ResourceType @{Name="CustomRoute1"; Endpoint="https://www.contoso.com/"}

Location  Name             Type
--------  ----             ----
West US 2 Namespace.Type   Microsoft.CustomProviders/resourceproviders

Create a custom resource provider

Example 2: Create a custom provider with associations

New-AzCustomProvider -ResourceGroupName myRG -Name Namespace2.Type -Location "West US 2" -ResourceType @{Name="CustomRoute1"; Endpoint="https://www.contoso.com/"}, @{Name="Associations"; Endpoint="https://contoso.com/myService"; RoutingType="Proxy,Cache,Extension"}

Location  Name             Type
--------  ----             ----
West US 2 Namespace2.Type   Microsoft.CustomProviders/resourceproviders

Create a custom provider, with a route for Custom provider associations.

Parameters

-Action

A list of actions that the custom resource provider implements. To construct, see NOTES section for ACTION properties and create a hash table.

Type:ICustomRpActionRouteDefinition[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-AsJob

Run the command as a job

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Location

Resource location

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Name

The name of the resource provider.

Type:String
Aliases:ResourceProviderName
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-NoWait

Run the command asynchronously

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The name of the resource group.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-ResourceType

A list of resource types that the custom resource provider implements. To construct, see NOTES section for RESOURCETYPE properties and create a hash table.

Type:ICustomRpResourceTypeRouteDefinition[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Accept pipeline input:False
Accept wildcard characters:False

-Tag

Resource tags

Type:Hashtable
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Validation

A list of validations to run on the custom resource provider's requests. To construct, see NOTES section for VALIDATION properties and create a hash table.

Type:ICustomRpValidations[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Outputs

ICustomRpManifest

Notes

ALIASES

COMPLEX PARAMETER PROPERTIES

To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.

ACTION <ICustomRpActionRouteDefinition[]>: A list of actions that the custom resource provider implements.

  • Endpoint <String>: The route definition endpoint URI that the custom resource provider will proxy requests to. This can be in the form of a flat URI (e.g. 'https://testendpoint/') or can specify to route via a path (e.g. 'https://testendpoint/{requestPath}')
  • Name <String>: The name of the route definition. This becomes the name for the ARM extension (e.g. '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomProviders/resourceProviders/{resourceProviderName}/{name}')
  • [RoutingType <ActionRouting?>]: The routing types that are supported for action requests.

RESOURCETYPE <ICustomRpResourceTypeRouteDefinition[]>: A list of resource types that the custom resource provider implements.

  • Endpoint <String>: The route definition endpoint URI that the custom resource provider will proxy requests to. This can be in the form of a flat URI (e.g. 'https://testendpoint/') or can specify to route via a path (e.g. 'https://testendpoint/{requestPath}')
  • Name <String>: The name of the route definition. This becomes the name for the ARM extension (e.g. '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomProviders/resourceProviders/{resourceProviderName}/{name}')
  • [RoutingType <ResourceTypeRouting?>]: The routing types that are supported for resource requests.

VALIDATION <ICustomRpValidations[]>: A list of validations to run on the custom resource provider's requests.

  • Specification <String>: A link to the validation specification. The specification must be hosted on raw.githubusercontent.com.
  • [ValidationType <ValidationType?>]: The type of validation to run against a matching request.