Create Rule

 

Creates a new rule. Once created, the resource manifest for the rule is immutable.

Request

Method

Request URI

HTTP Version

PUT

https://{serviceNamespace}.servicebus.windows.net/{topic path}/subscriptions/{subscription name}/rules/{rule name}

HTTP/1.1

Request Headers

The following table describes required and optional request headers.

Request Header

Description

Authorization

Specifies a WRAPv0.9.7.2 token containing a SimpleWebToken acquired from ACS. Set to WRAP access_token=”{swt}”.

Content-Type

Set to application/atom+xml;type=entry;charset=utf-8.

Request Body

Rule description: see RuleDescription.

Response

The response includes an HTTP status code and a set of response headers.

Response Codes

Code

Description

201

Rule created.

400

Invalid request body.

401

Authorization failure.

403

Quota exceeded; rule not created.

404

Specified subscription does not exist

409

The specified rule already exists.

For information about status codes, see Status and Error Codes.

Response Headers

None.

Response Body

The rule description is returned.

See Also

Rules
Delete Rule
Get Rule
List Rules
RuleDescription
Example: Creating a Rule