aws_sdk_apigateway/client/put_method.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`PutMethod`](crate::operation::put_method::builders::PutMethodFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`rest_api_id(impl Into<String>)`](crate::operation::put_method::builders::PutMethodFluentBuilder::rest_api_id) / [`set_rest_api_id(Option<String>)`](crate::operation::put_method::builders::PutMethodFluentBuilder::set_rest_api_id):<br>required: **true**<br><p>The string identifier of the associated RestApi.</p><br>
7 /// - [`resource_id(impl Into<String>)`](crate::operation::put_method::builders::PutMethodFluentBuilder::resource_id) / [`set_resource_id(Option<String>)`](crate::operation::put_method::builders::PutMethodFluentBuilder::set_resource_id):<br>required: **true**<br><p>The Resource identifier for the new Method resource.</p><br>
8 /// - [`http_method(impl Into<String>)`](crate::operation::put_method::builders::PutMethodFluentBuilder::http_method) / [`set_http_method(Option<String>)`](crate::operation::put_method::builders::PutMethodFluentBuilder::set_http_method):<br>required: **true**<br><p>Specifies the method request's HTTP method type.</p><br>
9 /// - [`authorization_type(impl Into<String>)`](crate::operation::put_method::builders::PutMethodFluentBuilder::authorization_type) / [`set_authorization_type(Option<String>)`](crate::operation::put_method::builders::PutMethodFluentBuilder::set_authorization_type):<br>required: **true**<br><p>The method's authorization type. Valid values are <code>NONE</code> for open access, <code>AWS_IAM</code> for using AWS IAM permissions, <code>CUSTOM</code> for using a custom authorizer, or <code>COGNITO_USER_POOLS</code> for using a Cognito user pool.</p><br>
10 /// - [`authorizer_id(impl Into<String>)`](crate::operation::put_method::builders::PutMethodFluentBuilder::authorizer_id) / [`set_authorizer_id(Option<String>)`](crate::operation::put_method::builders::PutMethodFluentBuilder::set_authorizer_id):<br>required: **false**<br><p>Specifies the identifier of an Authorizer to use on this Method, if the type is CUSTOM or COGNITO_USER_POOLS. The authorizer identifier is generated by API Gateway when you created the authorizer.</p><br>
11 /// - [`api_key_required(bool)`](crate::operation::put_method::builders::PutMethodFluentBuilder::api_key_required) / [`set_api_key_required(Option<bool>)`](crate::operation::put_method::builders::PutMethodFluentBuilder::set_api_key_required):<br>required: **false**<br><p>Specifies whether the method required a valid ApiKey.</p><br>
12 /// - [`operation_name(impl Into<String>)`](crate::operation::put_method::builders::PutMethodFluentBuilder::operation_name) / [`set_operation_name(Option<String>)`](crate::operation::put_method::builders::PutMethodFluentBuilder::set_operation_name):<br>required: **false**<br><p>A human-friendly operation identifier for the method. For example, you can assign the <code>operationName</code> of <code>ListPets</code> for the <code>GET /pets</code> method in the <code>PetStore</code> example.</p><br>
13 /// - [`request_parameters(impl Into<String>, bool)`](crate::operation::put_method::builders::PutMethodFluentBuilder::request_parameters) / [`set_request_parameters(Option<HashMap::<String, bool>>)`](crate::operation::put_method::builders::PutMethodFluentBuilder::set_request_parameters):<br>required: **false**<br><p>A key-value map defining required or optional method request parameters that can be accepted by API Gateway. A key defines a method request parameter name matching the pattern of <code>method.request.{location}.{name}</code>, where <code>location</code> is <code>querystring</code>, <code>path</code>, or <code>header</code> and <code>name</code> is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required (<code>true</code>) or optional (<code>false</code>). The method request parameter names defined here are available in Integration to be mapped to integration request parameters or body-mapping templates.</p><br>
14 /// - [`request_models(impl Into<String>, impl Into<String>)`](crate::operation::put_method::builders::PutMethodFluentBuilder::request_models) / [`set_request_models(Option<HashMap::<String, String>>)`](crate::operation::put_method::builders::PutMethodFluentBuilder::set_request_models):<br>required: **false**<br><p>Specifies the Model resources used for the request's content type. Request models are represented as a key/value map, with a content type as the key and a Model name as the value.</p><br>
15 /// - [`request_validator_id(impl Into<String>)`](crate::operation::put_method::builders::PutMethodFluentBuilder::request_validator_id) / [`set_request_validator_id(Option<String>)`](crate::operation::put_method::builders::PutMethodFluentBuilder::set_request_validator_id):<br>required: **false**<br><p>The identifier of a RequestValidator for validating the method request.</p><br>
16 /// - [`authorization_scopes(impl Into<String>)`](crate::operation::put_method::builders::PutMethodFluentBuilder::authorization_scopes) / [`set_authorization_scopes(Option<Vec::<String>>)`](crate::operation::put_method::builders::PutMethodFluentBuilder::set_authorization_scopes):<br>required: **false**<br><p>A list of authorization scopes configured on the method. The scopes are used with a <code>COGNITO_USER_POOLS</code> authorizer to authorize the method invocation. The authorization works by matching the method scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any method scopes matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the method scope is configured, the client must provide an access token instead of an identity token for authorization purposes.</p><br>
17 /// - On success, responds with [`PutMethodOutput`](crate::operation::put_method::PutMethodOutput) with field(s):
18 /// - [`http_method(Option<String>)`](crate::operation::put_method::PutMethodOutput::http_method): <p>The method's HTTP verb.</p>
19 /// - [`authorization_type(Option<String>)`](crate::operation::put_method::PutMethodOutput::authorization_type): <p>The method's authorization type. Valid values are <code>NONE</code> for open access, <code>AWS_IAM</code> for using AWS IAM permissions, <code>CUSTOM</code> for using a custom authorizer, or <code>COGNITO_USER_POOLS</code> for using a Cognito user pool.</p>
20 /// - [`authorizer_id(Option<String>)`](crate::operation::put_method::PutMethodOutput::authorizer_id): <p>The identifier of an Authorizer to use on this method. The <code>authorizationType</code> must be <code>CUSTOM</code>.</p>
21 /// - [`api_key_required(Option<bool>)`](crate::operation::put_method::PutMethodOutput::api_key_required): <p>A boolean flag specifying whether a valid ApiKey is required to invoke this method.</p>
22 /// - [`request_validator_id(Option<String>)`](crate::operation::put_method::PutMethodOutput::request_validator_id): <p>The identifier of a RequestValidator for request validation.</p>
23 /// - [`operation_name(Option<String>)`](crate::operation::put_method::PutMethodOutput::operation_name): <p>A human-friendly operation identifier for the method. For example, you can assign the <code>operationName</code> of <code>ListPets</code> for the <code>GET /pets</code> method in the <code>PetStore</code> example.</p>
24 /// - [`request_parameters(Option<HashMap::<String, bool>>)`](crate::operation::put_method::PutMethodOutput::request_parameters): <p>A key-value map defining required or optional method request parameters that can be accepted by API Gateway. A key is a method request parameter name matching the pattern of <code>method.request.{location}.{name}</code>, where <code>location</code> is <code>querystring</code>, <code>path</code>, or <code>header</code> and <code>name</code> is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required (<code>true</code>) or optional (<code>false</code>). The method request parameter names defined here are available in Integration to be mapped to integration request parameters or templates.</p>
25 /// - [`request_models(Option<HashMap::<String, String>>)`](crate::operation::put_method::PutMethodOutput::request_models): <p>A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key).</p>
26 /// - [`method_responses(Option<HashMap::<String, MethodResponse>>)`](crate::operation::put_method::PutMethodOutput::method_responses): <p>Gets a method response associated with a given HTTP status code.</p>
27 /// - [`method_integration(Option<Integration>)`](crate::operation::put_method::PutMethodOutput::method_integration): <p>Gets the method's integration responsible for passing the client-submitted request to the back end and performing necessary transformations to make the request compliant with the back end.</p>
28 /// - [`authorization_scopes(Option<Vec::<String>>)`](crate::operation::put_method::PutMethodOutput::authorization_scopes): <p>A list of authorization scopes configured on the method. The scopes are used with a <code>COGNITO_USER_POOLS</code> authorizer to authorize the method invocation. The authorization works by matching the method scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any method scopes matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the method scope is configured, the client must provide an access token instead of an identity token for authorization purposes.</p>
29 /// - On failure, responds with [`SdkError<PutMethodError>`](crate::operation::put_method::PutMethodError)
30 pub fn put_method(&self) -> crate::operation::put_method::builders::PutMethodFluentBuilder {
31 crate::operation::put_method::builders::PutMethodFluentBuilder::new(self.handle.clone())
32 }
33}