create_gateway_rule
async
¶
create_gateway_rule(
gateway_identifier: GatewayIdentifier,
priority: GatewayRulePriority,
actions: Actions,
*,
config_overrides: Optional[AsyncBedrockAgentCoreControlClientConfig] = None,
client_token: Optional[ClientToken] = None,
conditions: Optional[Conditions] = None,
description: Optional[GatewayRuleDescription] = None,
) -> CreateGatewayRuleResponse
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:
-
gateway_identifier(GatewayIdentifier) –The identifier of the gateway to create a rule for.
-
client_token(Optional[ClientToken], default: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.
-
priority(GatewayRulePriority) –The priority of the rule. Rules are evaluated in order of priority, with lower numbers evaluated first. Must be between 1 and 1,000,000.
-
conditions(Optional[Conditions], default:None) –The conditions that must be met for the rule to apply. Conditions can match on principals (IAM ARNs) or request paths.
-
actions(Actions) –The actions to take when the rule conditions are met. Actions can route to a specific target or apply a configuration bundle override.
-
description(Optional[GatewayRuleDescription], default:None) –The description of the gateway rule.
Raises:
-
AccessDeniedException–This exception is thrown when a request is denied per access permissions
-
ConflictException–This exception is thrown when there is a conflict performing an operation
-
InternalServerException–This exception is thrown if there was an unexpected error during processing of request
-
ResourceNotFoundException–This exception is thrown when a resource referenced by the operation does not exist
-
ServiceQuotaExceededException–This exception is thrown when a request is made beyond the service quota
-
ThrottlingException–This exception is thrown when the number of requests exceeds the limit
-
ValidationException–The input fails to satisfy the constraints specified by the service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_bedrock_agentcore_control/_services/async_bedrock_agent_core_control.py
7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 | |