New-AzCustomProviderAssociation

Create or update an association.

Syntax

New-AzCustomProviderAssociation
   -Name <String>
   -Scope <String>
   [-TargetResourceId <String>]
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

Create or update an association.

Examples

Example 1: Create a custom provider association

$provider = Get-AzCustomProvider -ResourceGroupName myRg -Name Namespace.Type
New-AzCustomProviderAssociation -Scope $resourceId -Name MyAssoc -TargetResourceId $provider.Id

Location  Name     Type
--------  ----     ----
East US 2 MyAssoc  Microsoft.CustomProviders/associations

Create a custom provider association, the associated target provioder must be properly configured with a route for "associations"

Parameters

-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

-Name

The name of the association.

Type:String
Aliases:AssociationName
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

-Scope

The scope of the association. The scope can be any valid REST resource instance. For example, use '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}' for a virtual machine resource.

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

-TargetResourceId

The REST resource instance of the target resource for this association.

Type:String
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

IAssociation

Notes

ALIASES