alicloud.rocketmq.QosPolicy
Explore with Pulumi AI
Provides a Sag qos policy resource. You need to create a QoS policy to set priorities, rate limits, and quintuple rules for different messages.
For information about Sag Qos Policy and how to use it, see What is Qos Policy.
NOTE: Available since v1.60.0.
NOTE: Only the following regions support. [
cn-shanghai
,cn-shanghai-finance-1
,cn-hongkong
,ap-southeast-1
,ap-southeast-3
,ap-southeast-5
,ap-northeast-1
,eu-central-1
]
Create QosPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new QosPolicy(name: string, args: QosPolicyArgs, opts?: CustomResourceOptions);
@overload
def QosPolicy(resource_name: str,
args: QosPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def QosPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
dest_cidr: Optional[str] = None,
dest_port_range: Optional[str] = None,
ip_protocol: Optional[str] = None,
priority: Optional[int] = None,
qos_id: Optional[str] = None,
source_cidr: Optional[str] = None,
source_port_range: Optional[str] = None,
description: Optional[str] = None,
end_time: Optional[str] = None,
name: Optional[str] = None,
start_time: Optional[str] = None)
func NewQosPolicy(ctx *Context, name string, args QosPolicyArgs, opts ...ResourceOption) (*QosPolicy, error)
public QosPolicy(string name, QosPolicyArgs args, CustomResourceOptions? opts = null)
public QosPolicy(String name, QosPolicyArgs args)
public QosPolicy(String name, QosPolicyArgs args, CustomResourceOptions options)
type: alicloud:rocketmq:QosPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args QosPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args QosPolicyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args QosPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args QosPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args QosPolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var qosPolicyResource = new AliCloud.RocketMQ.QosPolicy("qosPolicyResource", new()
{
DestCidr = "string",
DestPortRange = "string",
IpProtocol = "string",
Priority = 0,
QosId = "string",
SourceCidr = "string",
SourcePortRange = "string",
Description = "string",
EndTime = "string",
Name = "string",
StartTime = "string",
});
example, err := rocketmq.NewQosPolicy(ctx, "qosPolicyResource", &rocketmq.QosPolicyArgs{
DestCidr: pulumi.String("string"),
DestPortRange: pulumi.String("string"),
IpProtocol: pulumi.String("string"),
Priority: pulumi.Int(0),
QosId: pulumi.String("string"),
SourceCidr: pulumi.String("string"),
SourcePortRange: pulumi.String("string"),
Description: pulumi.String("string"),
EndTime: pulumi.String("string"),
Name: pulumi.String("string"),
StartTime: pulumi.String("string"),
})
var qosPolicyResource = new QosPolicy("qosPolicyResource", QosPolicyArgs.builder()
.destCidr("string")
.destPortRange("string")
.ipProtocol("string")
.priority(0)
.qosId("string")
.sourceCidr("string")
.sourcePortRange("string")
.description("string")
.endTime("string")
.name("string")
.startTime("string")
.build());
qos_policy_resource = alicloud.rocketmq.QosPolicy("qosPolicyResource",
dest_cidr="string",
dest_port_range="string",
ip_protocol="string",
priority=0,
qos_id="string",
source_cidr="string",
source_port_range="string",
description="string",
end_time="string",
name="string",
start_time="string")
const qosPolicyResource = new alicloud.rocketmq.QosPolicy("qosPolicyResource", {
destCidr: "string",
destPortRange: "string",
ipProtocol: "string",
priority: 0,
qosId: "string",
sourceCidr: "string",
sourcePortRange: "string",
description: "string",
endTime: "string",
name: "string",
startTime: "string",
});
type: alicloud:rocketmq:QosPolicy
properties:
description: string
destCidr: string
destPortRange: string
endTime: string
ipProtocol: string
name: string
priority: 0
qosId: string
sourceCidr: string
sourcePortRange: string
startTime: string
QosPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The QosPolicy resource accepts the following input properties:
- Dest
Cidr string - The destination CIDR block.
- Dest
Port stringRange - The destination port range.
- Ip
Protocol string - The transport layer protocol.
- Priority int
- The priority of the quintuple rule. A smaller value indicates a higher priority. If the priorities of two quintuple rules are the same, the rule created earlier is applied first.Value range: 1 to 7.
- Qos
Id string - The instance ID of the QoS policy to which the quintuple rule is created.
- Source
Cidr string - The source CIDR block.
- Source
Port stringRange - The source port range of the transport layer.
- Description string
- The description of the QoS policy.
- End
Time string - The expiration time of the quintuple rule.
- Name string
- The name of the QoS policy.
- Start
Time string - The time when the quintuple rule takes effect.
- Dest
Cidr string - The destination CIDR block.
- Dest
Port stringRange - The destination port range.
- Ip
Protocol string - The transport layer protocol.
- Priority int
- The priority of the quintuple rule. A smaller value indicates a higher priority. If the priorities of two quintuple rules are the same, the rule created earlier is applied first.Value range: 1 to 7.
- Qos
Id string - The instance ID of the QoS policy to which the quintuple rule is created.
- Source
Cidr string - The source CIDR block.
- Source
Port stringRange - The source port range of the transport layer.
- Description string
- The description of the QoS policy.
- End
Time string - The expiration time of the quintuple rule.
- Name string
- The name of the QoS policy.
- Start
Time string - The time when the quintuple rule takes effect.
- dest
Cidr String - The destination CIDR block.
- dest
Port StringRange - The destination port range.
- ip
Protocol String - The transport layer protocol.
- priority Integer
- The priority of the quintuple rule. A smaller value indicates a higher priority. If the priorities of two quintuple rules are the same, the rule created earlier is applied first.Value range: 1 to 7.
- qos
Id String - The instance ID of the QoS policy to which the quintuple rule is created.
- source
Cidr String - The source CIDR block.
- source
Port StringRange - The source port range of the transport layer.
- description String
- The description of the QoS policy.
- end
Time String - The expiration time of the quintuple rule.
- name String
- The name of the QoS policy.
- start
Time String - The time when the quintuple rule takes effect.
- dest
Cidr string - The destination CIDR block.
- dest
Port stringRange - The destination port range.
- ip
Protocol string - The transport layer protocol.
- priority number
- The priority of the quintuple rule. A smaller value indicates a higher priority. If the priorities of two quintuple rules are the same, the rule created earlier is applied first.Value range: 1 to 7.
- qos
Id string - The instance ID of the QoS policy to which the quintuple rule is created.
- source
Cidr string - The source CIDR block.
- source
Port stringRange - The source port range of the transport layer.
- description string
- The description of the QoS policy.
- end
Time string - The expiration time of the quintuple rule.
- name string
- The name of the QoS policy.
- start
Time string - The time when the quintuple rule takes effect.
- dest_
cidr str - The destination CIDR block.
- dest_
port_ strrange - The destination port range.
- ip_
protocol str - The transport layer protocol.
- priority int
- The priority of the quintuple rule. A smaller value indicates a higher priority. If the priorities of two quintuple rules are the same, the rule created earlier is applied first.Value range: 1 to 7.
- qos_
id str - The instance ID of the QoS policy to which the quintuple rule is created.
- source_
cidr str - The source CIDR block.
- source_
port_ strrange - The source port range of the transport layer.
- description str
- The description of the QoS policy.
- end_
time str - The expiration time of the quintuple rule.
- name str
- The name of the QoS policy.
- start_
time str - The time when the quintuple rule takes effect.
- dest
Cidr String - The destination CIDR block.
- dest
Port StringRange - The destination port range.
- ip
Protocol String - The transport layer protocol.
- priority Number
- The priority of the quintuple rule. A smaller value indicates a higher priority. If the priorities of two quintuple rules are the same, the rule created earlier is applied first.Value range: 1 to 7.
- qos
Id String - The instance ID of the QoS policy to which the quintuple rule is created.
- source
Cidr String - The source CIDR block.
- source
Port StringRange - The source port range of the transport layer.
- description String
- The description of the QoS policy.
- end
Time String - The expiration time of the quintuple rule.
- name String
- The name of the QoS policy.
- start
Time String - The time when the quintuple rule takes effect.
Outputs
All input properties are implicitly available as output properties. Additionally, the QosPolicy resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing QosPolicy Resource
Get an existing QosPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: QosPolicyState, opts?: CustomResourceOptions): QosPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
dest_cidr: Optional[str] = None,
dest_port_range: Optional[str] = None,
end_time: Optional[str] = None,
ip_protocol: Optional[str] = None,
name: Optional[str] = None,
priority: Optional[int] = None,
qos_id: Optional[str] = None,
source_cidr: Optional[str] = None,
source_port_range: Optional[str] = None,
start_time: Optional[str] = None) -> QosPolicy
func GetQosPolicy(ctx *Context, name string, id IDInput, state *QosPolicyState, opts ...ResourceOption) (*QosPolicy, error)
public static QosPolicy Get(string name, Input<string> id, QosPolicyState? state, CustomResourceOptions? opts = null)
public static QosPolicy get(String name, Output<String> id, QosPolicyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Description string
- The description of the QoS policy.
- Dest
Cidr string - The destination CIDR block.
- Dest
Port stringRange - The destination port range.
- End
Time string - The expiration time of the quintuple rule.
- Ip
Protocol string - The transport layer protocol.
- Name string
- The name of the QoS policy.
- Priority int
- The priority of the quintuple rule. A smaller value indicates a higher priority. If the priorities of two quintuple rules are the same, the rule created earlier is applied first.Value range: 1 to 7.
- Qos
Id string - The instance ID of the QoS policy to which the quintuple rule is created.
- Source
Cidr string - The source CIDR block.
- Source
Port stringRange - The source port range of the transport layer.
- Start
Time string - The time when the quintuple rule takes effect.
- Description string
- The description of the QoS policy.
- Dest
Cidr string - The destination CIDR block.
- Dest
Port stringRange - The destination port range.
- End
Time string - The expiration time of the quintuple rule.
- Ip
Protocol string - The transport layer protocol.
- Name string
- The name of the QoS policy.
- Priority int
- The priority of the quintuple rule. A smaller value indicates a higher priority. If the priorities of two quintuple rules are the same, the rule created earlier is applied first.Value range: 1 to 7.
- Qos
Id string - The instance ID of the QoS policy to which the quintuple rule is created.
- Source
Cidr string - The source CIDR block.
- Source
Port stringRange - The source port range of the transport layer.
- Start
Time string - The time when the quintuple rule takes effect.
- description String
- The description of the QoS policy.
- dest
Cidr String - The destination CIDR block.
- dest
Port StringRange - The destination port range.
- end
Time String - The expiration time of the quintuple rule.
- ip
Protocol String - The transport layer protocol.
- name String
- The name of the QoS policy.
- priority Integer
- The priority of the quintuple rule. A smaller value indicates a higher priority. If the priorities of two quintuple rules are the same, the rule created earlier is applied first.Value range: 1 to 7.
- qos
Id String - The instance ID of the QoS policy to which the quintuple rule is created.
- source
Cidr String - The source CIDR block.
- source
Port StringRange - The source port range of the transport layer.
- start
Time String - The time when the quintuple rule takes effect.
- description string
- The description of the QoS policy.
- dest
Cidr string - The destination CIDR block.
- dest
Port stringRange - The destination port range.
- end
Time string - The expiration time of the quintuple rule.
- ip
Protocol string - The transport layer protocol.
- name string
- The name of the QoS policy.
- priority number
- The priority of the quintuple rule. A smaller value indicates a higher priority. If the priorities of two quintuple rules are the same, the rule created earlier is applied first.Value range: 1 to 7.
- qos
Id string - The instance ID of the QoS policy to which the quintuple rule is created.
- source
Cidr string - The source CIDR block.
- source
Port stringRange - The source port range of the transport layer.
- start
Time string - The time when the quintuple rule takes effect.
- description str
- The description of the QoS policy.
- dest_
cidr str - The destination CIDR block.
- dest_
port_ strrange - The destination port range.
- end_
time str - The expiration time of the quintuple rule.
- ip_
protocol str - The transport layer protocol.
- name str
- The name of the QoS policy.
- priority int
- The priority of the quintuple rule. A smaller value indicates a higher priority. If the priorities of two quintuple rules are the same, the rule created earlier is applied first.Value range: 1 to 7.
- qos_
id str - The instance ID of the QoS policy to which the quintuple rule is created.
- source_
cidr str - The source CIDR block.
- source_
port_ strrange - The source port range of the transport layer.
- start_
time str - The time when the quintuple rule takes effect.
- description String
- The description of the QoS policy.
- dest
Cidr String - The destination CIDR block.
- dest
Port StringRange - The destination port range.
- end
Time String - The expiration time of the quintuple rule.
- ip
Protocol String - The transport layer protocol.
- name String
- The name of the QoS policy.
- priority Number
- The priority of the quintuple rule. A smaller value indicates a higher priority. If the priorities of two quintuple rules are the same, the rule created earlier is applied first.Value range: 1 to 7.
- qos
Id String - The instance ID of the QoS policy to which the quintuple rule is created.
- source
Cidr String - The source CIDR block.
- source
Port StringRange - The source port range of the transport layer.
- start
Time String - The time when the quintuple rule takes effect.
Import
The Sag Qos Policy can be imported using the id, e.g.
$ pulumi import alicloud:rocketmq/qosPolicy:QosPolicy example qos-abc123456:qospy-abc123456
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.