編集

次の方法で共有


New-AzServiceBusQueue

Create a Service Bus queue. This operation is idempotent.

Syntax

New-AzServiceBusQueue
   -Name <String>
   -NamespaceName <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   [-AutoDeleteOnIdle <TimeSpan>]
   [-DeadLetteringOnMessageExpiration]
   [-DefaultMessageTimeToLive <TimeSpan>]
   [-DuplicateDetectionHistoryTimeWindow <TimeSpan>]
   [-EnableBatchedOperations]
   [-EnableExpress]
   [-EnablePartitioning]
   [-ForwardDeadLetteredMessagesTo <String>]
   [-ForwardTo <String>]
   [-LockDuration <TimeSpan>]
   [-MaxDeliveryCount <Int32>]
   [-MaxMessageSizeInKilobytes <Int64>]
   [-MaxSizeInMegabytes <Int32>]
   [-RequiresDuplicateDetection]
   [-RequiresSession]
   [-Status <String>]
   [-DefaultProfile <PSObject>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzServiceBusQueue
   -Name <String>
   -NamespaceInputObject <IServiceBusIdentity>
   [-AutoDeleteOnIdle <TimeSpan>]
   [-DeadLetteringOnMessageExpiration]
   [-DefaultMessageTimeToLive <TimeSpan>]
   [-DuplicateDetectionHistoryTimeWindow <TimeSpan>]
   [-EnableBatchedOperations]
   [-EnableExpress]
   [-EnablePartitioning]
   [-ForwardDeadLetteredMessagesTo <String>]
   [-ForwardTo <String>]
   [-LockDuration <TimeSpan>]
   [-MaxDeliveryCount <Int32>]
   [-MaxMessageSizeInKilobytes <Int64>]
   [-MaxSizeInMegabytes <Int32>]
   [-RequiresDuplicateDetection]
   [-RequiresSession]
   [-Status <String>]
   [-DefaultProfile <PSObject>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzServiceBusQueue
   -Name <String>
   -NamespaceInputObject <IServiceBusIdentity>
   -Parameter <ISbQueue>
   [-DefaultProfile <PSObject>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Create a Service Bus queue. This operation is idempotent.

Examples

Example 1: Create a new ServiceBus queue

New-AzServiceBusQueue -ResourceGroupName myResourceGroup -NamespaceName myNamespace -Name myQueue -AutoDeleteOnIdle (New-TimeSpan -Days 1 -Minutes 3 -Seconds 4) -DefaultMessageTimeToLive (New-TimeSpan -Days 5) -EnablePartitioning

AccessedAt                                : 1/1/0001 12:00:00 AM
AutoDeleteOnIdle                          : 1.00:03:04
CountDetailActiveMessageCount             : 0
CountDetailDeadLetterMessageCount         : 0
CountDetailScheduledMessageCount          : 0
CountDetailTransferDeadLetterMessageCount : 0
CountDetailTransferMessageCount           : 0
CreatedAt                                 : 9/22/2022 12:30:45 PM
DeadLetteringOnMessageExpiration          : False
DefaultMessageTimeToLive                  : 5.00:00:00
DuplicateDetectionHistoryTimeWindow       : 00:10:00
EnableBatchedOperations                   : True
EnableExpress                             : False
EnablePartitioning                        : True
ForwardDeadLetteredMessagesTo             :
ForwardTo                                 :
Id                                        : /subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/myResourceGroup/providers/Microsoft.ServiceBus/namespaces/myNamespace/queues/myQueue
Location                                  : westus
LockDuration                              : 00:01:00
MaxDeliveryCount                          : 10
MaxMessageSizeInKilobytes                 : 1024
MaxSizeInMegabytes                        : 1024
MessageCount                              : 0
Name                                      : myQueue
RequiresDuplicateDetection                : False
RequiresSession                           : False
ResourceGroupName                         : myResourceGroup
SizeInByte                                : 0
Status                                    : Active

Creates a ServiceBus queue myQueue in namespace myNamespace.

Parameters

-AutoDeleteOnIdle

Idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes.

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

-DeadLetteringOnMessageExpiration

A value that indicates whether this queue has dead letter support when a message expires.

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

-DefaultMessageTimeToLive

This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.

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

-DuplicateDetectionHistoryTimeWindow

Defines the duration of the duplicate detection history. The default value is 10 minutes.

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

-EnableBatchedOperations

Value that indicates whether server-side batched operations are enabled.

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

-EnableExpress

A value that indicates whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage.

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

-EnablePartitioning

A value that indicates whether the queue is to be partitioned across multiple message brokers.

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

-ForwardDeadLetteredMessagesTo

Queue/Topic name to forward the Dead Letter message

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

-ForwardTo

Queue/Topic name to forward the messages

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

-LockDuration

Timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute.

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

-MaxDeliveryCount

The maximum delivery count. A message is automatically deadlettered after this number of deliveries. default value is 10.

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

-MaxMessageSizeInKilobytes

Maximum size (in KB) of the message payload that can be accepted by the queue. This property is only used in Premium today and default is 1024.

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

-MaxSizeInMegabytes

The maximum size of the queue in megabytes, which is the size of memory allocated for the queue. Default is 1024.

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

-Name

The queue name.

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

-NamespaceInputObject

Identity Parameter

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

-NamespaceName

The namespace name

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

-Parameter

Description of queue Resource.

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

-RequiresDuplicateDetection

A value indicating if this queue requires duplicate detection.

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

-RequiresSession

A value that indicates whether the queue supports the concept of sessions.

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

-ResourceGroupName

Name of the Resource group within the Azure subscription.

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

-Status

Enumerates the possible values for the status of a messaging entity.

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

ISbQueue

IServiceBusIdentity

Outputs

ISbQueue