你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

New-AzEventGridClient

create a client with the specified parameters.

Syntax

New-AzEventGridClient
   -Name <String>
   -NamespaceName <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   [-Attribute <Hashtable>]
   [-AuthenticationName <String>]
   [-CertificateSubjectCommonName <String>]
   [-CertificateSubjectCountryCode <String>]
   [-CertificateSubjectOrganization <String>]
   [-CertificateSubjectOrganizationUnit <String>]
   [-CertificateThumbprintPrimary <String>]
   [-CertificateThumbprintSecondary <String>]
   [-ClientCertificateAuthenticationAllowedThumbprint <String[]>]
   [-ClientCertificateAuthenticationValidationScheme <String>]
   [-Description <String>]
   [-State <String>]
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzEventGridClient
   -Name <String>
   -NamespaceName <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   -JsonString <String>
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzEventGridClient
   -Name <String>
   -NamespaceName <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   -JsonFilePath <String>
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzEventGridClient
   -Name <String>
   -NamespaceInputObject <IEventGridIdentity>
   [-Attribute <Hashtable>]
   [-AuthenticationName <String>]
   [-CertificateSubjectCommonName <String>]
   [-CertificateSubjectCountryCode <String>]
   [-CertificateSubjectOrganization <String>]
   [-CertificateSubjectOrganizationUnit <String>]
   [-CertificateThumbprintPrimary <String>]
   [-CertificateThumbprintSecondary <String>]
   [-ClientCertificateAuthenticationAllowedThumbprint <String[]>]
   [-ClientCertificateAuthenticationValidationScheme <String>]
   [-Description <String>]
   [-State <String>]
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzEventGridClient
   -InputObject <IEventGridIdentity>
   [-Attribute <Hashtable>]
   [-AuthenticationName <String>]
   [-CertificateSubjectCommonName <String>]
   [-CertificateSubjectCountryCode <String>]
   [-CertificateSubjectOrganization <String>]
   [-CertificateSubjectOrganizationUnit <String>]
   [-CertificateThumbprintPrimary <String>]
   [-CertificateThumbprintSecondary <String>]
   [-ClientCertificateAuthenticationAllowedThumbprint <String[]>]
   [-ClientCertificateAuthenticationValidationScheme <String>]
   [-Description <String>]
   [-State <String>]
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

create a client with the specified parameters.

Examples

Example 1: Create a client with the specified parameters.

$attribute = @{"room"="345";"floor"="3";"deviceTypes"="Fan"}
New-AzEventGridClient -Name azps-client -NamespaceName azps-eventgridnamespace -ResourceGroupName azps_test_group_eventgrid -Attribute $attribute -State Enabled -ClientCertificateAuthenticationValidationScheme "SubjectMatchesAuthenticationName"

Name        ResourceGroupName
----        -----------------
azps-client azps_test_group_eventgrid

Create a client with the specified parameters.

Parameters

-AsJob

Run the command as a job

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

-Attribute

Attributes for the client. Supported values are int, bool, string, string[].Example:"attributes": { "room": "345", "floor": 12, "deviceTypes": ["Fan", "Light"] }

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

-AuthenticationName

The name presented by the client for authentication. The default value is the name of the resource.

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

-CertificateSubjectCommonName

The common name field in the subject name. The allowed limit is 64 characters and it should be specified.

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

-CertificateSubjectCountryCode

The country code field in the subject name. If present, the country code should be represented by two-letter code defined in ISO 2166-1 (alpha-2). For example: 'US'.

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

-CertificateSubjectOrganization

The organization field in the subject name. If present, the allowed limit is 64 characters.

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

-CertificateSubjectOrganizationUnit

The organization unit field in the subject name. If present, the allowed limit is 32 characters.

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

-CertificateThumbprintPrimary

The primary thumbprint used for validation.

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

-CertificateThumbprintSecondary

The secondary thumbprint used for validation.

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

-ClientCertificateAuthenticationAllowedThumbprint

The list of thumbprints that are allowed during client authentication. This property is required only if the validationScheme is 'ThumbprintMatch'.

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

-ClientCertificateAuthenticationValidationScheme

The validation scheme used to authenticate the client. Default value is SubjectMatchesAuthenticationName.

Type:String
Position:Named
Default value:None
Required:False
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

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

-Description

Description for the Client resource.

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

-InputObject

Identity Parameter

Type:IEventGridIdentity
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-JsonFilePath

Path of Json file supplied to the Create operation

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

-JsonString

Json string supplied to the Create operation

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

-Name

The client name.

Type:String
Aliases:ClientName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-NamespaceInputObject

Identity Parameter

Type:IEventGridIdentity
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-NamespaceName

Name of the namespace.

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

-NoWait

Run the command asynchronously

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

-ResourceGroupName

The name of the resource group within the user's subscription.

Type:String
Aliases:ResourceGroup
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-State

Indicates if the client is enabled or not. Default value is Enabled.

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

-SubscriptionId

Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

IEventGridIdentity

Outputs

IClient