Modifier

Partager via


Grant-AzEventGridPartnerConfiguration

Authorize a single partner either by partner registration immutable Id or by partner name.

Syntax

Grant-AzEventGridPartnerConfiguration
     -ResourceGroupName <String>
     [-SubscriptionId <String>]
     [-AuthorizationExpirationTimeInUtc <DateTime>]
     [-PartnerName <String>]
     [-PartnerRegistrationImmutableId <String>]
     [-DefaultProfile <PSObject>]
     [-PassThru]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Grant-AzEventGridPartnerConfiguration
     -ResourceGroupName <String>
     [-SubscriptionId <String>]
     -PartnerInfo <IPartner>
     [-DefaultProfile <PSObject>]
     [-PassThru]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Grant-AzEventGridPartnerConfiguration
     -ResourceGroupName <String>
     [-SubscriptionId <String>]
     -JsonFilePath <String>
     [-DefaultProfile <PSObject>]
     [-PassThru]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Grant-AzEventGridPartnerConfiguration
     -ResourceGroupName <String>
     [-SubscriptionId <String>]
     -JsonString <String>
     [-DefaultProfile <PSObject>]
     [-PassThru]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]

Description

Authorize a single partner either by partner registration immutable Id or by partner name.

Examples

Example 1: Authorize a single partner either by partner registration immutable Id or by partner name.

$partnerRegistration = Get-AzEventGridPartnerRegistration -ResourceGroupName azps_test_group_eventgrid -Name azps-registration
Grant-AzEventGridPartnerConfiguration -ResourceGroupName azps_test_group_eventgrid -AuthorizationExpirationTimeInUtc "2024-01-09T09:31:42.521Z" -PartnerName default -PartnerRegistrationImmutableId $partnerRegistration.ImmutableId

Name    Location ResourceGroupName
----    -------- -----------------
default global   azps_test_group_eventgrid

Authorize a single partner either by partner registration immutable Id or by partner name.

Parameters

-AuthorizationExpirationTimeInUtc

Expiration time of the partner authorization. If this timer expires, any request from this partner to create, update or delete resources in subscriber'scontext will fail. If specified, the allowed values are between 1 to the value of defaultMaximumExpirationTimeInDays specified in PartnerConfiguration.If not specified, the default value will be the value of defaultMaximumExpirationTimeInDays specified in PartnerConfiguration or 7 if this value is not specified.

Type:DateTime
Aliases:AuthorizationExpirationTime
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

-JsonFilePath

Path of Json file supplied to the Authorize operation

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

-JsonString

Json string supplied to the Authorize operation

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

-PartnerInfo

Information about the partner.

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

-PartnerName

The partner name.

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

-PartnerRegistrationImmutableId

The immutableId of the corresponding partner registration.

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

-PassThru

Returns true when the command succeeds

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

-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

IPartner

Outputs

IPartnerConfiguration