create_gateway_rule¶
Operation¶
create_gateway_rule
¶
create_gateway_rule(request: CreateGatewayRuleInput | CreateGatewayRuleInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateGatewayRuleInputDict]) -> CreateGatewayRuleOutput
Creates a rule for a gateway. Rules define conditions and actions that control how requests are routed and processed through the gateway, including principal-based access control and path-based routing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
CreateGatewayRuleInput | CreateGatewayRuleInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[CreateGatewayRuleInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
CreateGatewayRuleOutput
|
An instance of |
create_gateway_rule
async
¶
create_gateway_rule(request: CreateGatewayRuleInput | CreateGatewayRuleInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateGatewayRuleInputDict]) -> CreateGatewayRuleOutput
Creates a rule for a gateway. Rules define conditions and actions that control how requests are routed and processed through the gateway, including principal-based access control and path-based routing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
CreateGatewayRuleInput | CreateGatewayRuleInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[CreateGatewayRuleInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
CreateGatewayRuleOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
CreateGatewayRuleInputDict
¶
Bases: TypedDict
Dictionary form of CreateGatewayRuleInput.
Attributes¶
actions
instance-attribute
¶
actions: Required[Sequence[Action | ActionDict]]
The actions to take when the rule conditions are met. Actions can route to a specific target or apply a configuration bundle override.
client_token
instance-attribute
¶
client_token: str | None
A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see Ensuring idempotency.
This field is autopopulated if not provided.
conditions
instance-attribute
¶
conditions: Sequence[Condition | ConditionDict] | None
The conditions that must be met for the rule to apply. Conditions can match on principals (IAM ARNs) or request paths.
gateway_identifier
instance-attribute
¶
The identifier of the gateway to create a rule for.
CreateGatewayRuleInput
dataclass
¶
Bases: _SerdeShape
Dataclass for CreateGatewayRuleInput structure.
Attributes¶
actions
class-attribute
instance-attribute
¶
The actions to take when the rule conditions are met. Actions can route to a specific target or apply a configuration bundle override.
client_token
class-attribute
instance-attribute
¶
client_token: str | None = ...
A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see Ensuring idempotency.
This field is autopopulated if not provided.
conditions
class-attribute
instance-attribute
¶
The conditions that must be met for the rule to apply. Conditions can match on principals (IAM ARNs) or request paths.
description
class-attribute
instance-attribute
¶
description: str | None = ...
The description of the gateway rule.
Output¶
CreateGatewayRuleOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for CreateGatewayRuleOutput structure.
Attributes¶
actions
instance-attribute
¶
The actions to take when the rule conditions are met.
conditions
class-attribute
instance-attribute
¶
The conditions that must be met for the rule to apply.
description
class-attribute
instance-attribute
¶
description: str | None = ...
The description of the gateway rule.
gateway_arn
instance-attribute
¶
gateway_arn: str
The Amazon Resource Name (ARN) of the gateway that the rule belongs to.
priority
instance-attribute
¶
priority: int
The priority of the rule. Rules are evaluated in order of priority, with lower numbers evaluated first.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.
system
class-attribute
instance-attribute
¶
system: SystemManagedBlock | None = ...
System-managed metadata for rules created by automated processes.