aws_sdk_apigateway/client/get_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 [`GetMethod`](crate::operation::get_method::builders::GetMethodFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`rest_api_id(impl Into<String>)`](crate::operation::get_method::builders::GetMethodFluentBuilder::rest_api_id) / [`set_rest_api_id(Option<String>)`](crate::operation::get_method::builders::GetMethodFluentBuilder::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::get_method::builders::GetMethodFluentBuilder::resource_id) / [`set_resource_id(Option<String>)`](crate::operation::get_method::builders::GetMethodFluentBuilder::set_resource_id):<br>required: **true**<br><p>The Resource identifier for the Method resource.</p><br>
8 /// - [`http_method(impl Into<String>)`](crate::operation::get_method::builders::GetMethodFluentBuilder::http_method) / [`set_http_method(Option<String>)`](crate::operation::get_method::builders::GetMethodFluentBuilder::set_http_method):<br>required: **true**<br><p>Specifies the method request's HTTP method type.</p><br>
9 /// - On success, responds with [`GetMethodOutput`](crate::operation::get_method::GetMethodOutput) with field(s):
10 /// - [`http_method(Option<String>)`](crate::operation::get_method::GetMethodOutput::http_method): <p>The method's HTTP verb.</p>
11 /// - [`authorization_type(Option<String>)`](crate::operation::get_method::GetMethodOutput::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>
12 /// - [`authorizer_id(Option<String>)`](crate::operation::get_method::GetMethodOutput::authorizer_id): <p>The identifier of an Authorizer to use on this method. The <code>authorizationType</code> must be <code>CUSTOM</code>.</p>
13 /// - [`api_key_required(Option<bool>)`](crate::operation::get_method::GetMethodOutput::api_key_required): <p>A boolean flag specifying whether a valid ApiKey is required to invoke this method.</p>
14 /// - [`request_validator_id(Option<String>)`](crate::operation::get_method::GetMethodOutput::request_validator_id): <p>The identifier of a RequestValidator for request validation.</p>
15 /// - [`operation_name(Option<String>)`](crate::operation::get_method::GetMethodOutput::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>
16 /// - [`request_parameters(Option<HashMap::<String, bool>>)`](crate::operation::get_method::GetMethodOutput::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>
17 /// - [`request_models(Option<HashMap::<String, String>>)`](crate::operation::get_method::GetMethodOutput::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>
18 /// - [`method_responses(Option<HashMap::<String, MethodResponse>>)`](crate::operation::get_method::GetMethodOutput::method_responses): <p>Gets a method response associated with a given HTTP status code.</p>
19 /// - [`method_integration(Option<Integration>)`](crate::operation::get_method::GetMethodOutput::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>
20 /// - [`authorization_scopes(Option<Vec::<String>>)`](crate::operation::get_method::GetMethodOutput::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>
21 /// - On failure, responds with [`SdkError<GetMethodError>`](crate::operation::get_method::GetMethodError)
22 pub fn get_method(&self) -> crate::operation::get_method::builders::GetMethodFluentBuilder {
23 crate::operation::get_method::builders::GetMethodFluentBuilder::new(self.handle.clone())
24 }
25}