You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::ApiGatewayV2::Types::CreateRouteRequest

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-apigatewayv2/lib/aws-sdk-apigatewayv2/types.rb

Overview

Note:

When making an API call, you may pass CreateRouteRequest data as a hash:

{
  api_id: "__string", # required
  api_key_required: false,
  authorization_scopes: ["StringWithLengthBetween1And64"],
  authorization_type: "NONE", # accepts NONE, AWS_IAM, CUSTOM
  authorizer_id: "Id",
  model_selection_expression: "SelectionExpression",
  operation_name: "StringWithLengthBetween1And64",
  request_models: {
    "__string" => "StringWithLengthBetween1And128",
  },
  request_parameters: {
    "__string" => {
      required: false,
    },
  },
  route_key: "SelectionKey", # required
  route_response_selection_expression: "SelectionExpression",
  target: "StringWithLengthBetween1And128",
}

Instance Attribute Summary collapse

Instance Attribute Details

#api_idString

Returns:

  • (String)


1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
# File 'gems/aws-sdk-apigatewayv2/lib/aws-sdk-apigatewayv2/types.rb', line 1767

class CreateRouteRequest < Struct.new(
  :api_id,
  :api_key_required,
  :authorization_scopes,
  :authorization_type,
  :authorizer_id,
  :model_selection_expression,
  :operation_name,
  :request_models,
  :request_parameters,
  :route_key,
  :route_response_selection_expression,
  :target)
  include Aws::Structure
end

#api_key_requiredBoolean

Returns:

  • (Boolean)


1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
# File 'gems/aws-sdk-apigatewayv2/lib/aws-sdk-apigatewayv2/types.rb', line 1767

class CreateRouteRequest < Struct.new(
  :api_id,
  :api_key_required,
  :authorization_scopes,
  :authorization_type,
  :authorizer_id,
  :model_selection_expression,
  :operation_name,
  :request_models,
  :request_parameters,
  :route_key,
  :route_response_selection_expression,
  :target)
  include Aws::Structure
end

#authorization_scopesArray<String>

A list of authorization scopes configured on a route. The scopes are used with a COGNITO_USER_POOLS authorizer to authorize the method invocation. The authorization works by matching the route scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any route scope matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the route scope is configured, the client must provide an access token instead of an identity token for authorization purposes.

Returns:

  • (Array<String>)


1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
# File 'gems/aws-sdk-apigatewayv2/lib/aws-sdk-apigatewayv2/types.rb', line 1767

class CreateRouteRequest < Struct.new(
  :api_id,
  :api_key_required,
  :authorization_scopes,
  :authorization_type,
  :authorizer_id,
  :model_selection_expression,
  :operation_name,
  :request_models,
  :request_parameters,
  :route_key,
  :route_response_selection_expression,
  :target)
  include Aws::Structure
end

#authorization_typeString

The authorization type. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer.

Returns:

  • (String)


1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
# File 'gems/aws-sdk-apigatewayv2/lib/aws-sdk-apigatewayv2/types.rb', line 1767

class CreateRouteRequest < Struct.new(
  :api_id,
  :api_key_required,
  :authorization_scopes,
  :authorization_type,
  :authorizer_id,
  :model_selection_expression,
  :operation_name,
  :request_models,
  :request_parameters,
  :route_key,
  :route_response_selection_expression,
  :target)
  include Aws::Structure
end

#authorizer_idString

The identifier.

Returns:

  • (String)


1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
# File 'gems/aws-sdk-apigatewayv2/lib/aws-sdk-apigatewayv2/types.rb', line 1767

class CreateRouteRequest < Struct.new(
  :api_id,
  :api_key_required,
  :authorization_scopes,
  :authorization_type,
  :authorizer_id,
  :model_selection_expression,
  :operation_name,
  :request_models,
  :request_parameters,
  :route_key,
  :route_response_selection_expression,
  :target)
  include Aws::Structure
end

#model_selection_expressionString

An expression used to extract information at runtime. See Selection Expressions for more information.

Returns:

  • (String)


1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
# File 'gems/aws-sdk-apigatewayv2/lib/aws-sdk-apigatewayv2/types.rb', line 1767

class CreateRouteRequest < Struct.new(
  :api_id,
  :api_key_required,
  :authorization_scopes,
  :authorization_type,
  :authorizer_id,
  :model_selection_expression,
  :operation_name,
  :request_models,
  :request_parameters,
  :route_key,
  :route_response_selection_expression,
  :target)
  include Aws::Structure
end

#operation_nameString

A string with a length between [1-64].

Returns:

  • (String)


1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
# File 'gems/aws-sdk-apigatewayv2/lib/aws-sdk-apigatewayv2/types.rb', line 1767

class CreateRouteRequest < Struct.new(
  :api_id,
  :api_key_required,
  :authorization_scopes,
  :authorization_type,
  :authorizer_id,
  :model_selection_expression,
  :operation_name,
  :request_models,
  :request_parameters,
  :route_key,
  :route_response_selection_expression,
  :target)
  include Aws::Structure
end

#request_modelsHash<String,String>

The route models.

Returns:

  • (Hash<String,String>)


1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
# File 'gems/aws-sdk-apigatewayv2/lib/aws-sdk-apigatewayv2/types.rb', line 1767

class CreateRouteRequest < Struct.new(
  :api_id,
  :api_key_required,
  :authorization_scopes,
  :authorization_type,
  :authorizer_id,
  :model_selection_expression,
  :operation_name,
  :request_models,
  :request_parameters,
  :route_key,
  :route_response_selection_expression,
  :target)
  include Aws::Structure
end

#request_parametersHash<String,Types::ParameterConstraints>

The route parameters.

Returns:



1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
# File 'gems/aws-sdk-apigatewayv2/lib/aws-sdk-apigatewayv2/types.rb', line 1767

class CreateRouteRequest < Struct.new(
  :api_id,
  :api_key_required,
  :authorization_scopes,
  :authorization_type,
  :authorizer_id,
  :model_selection_expression,
  :operation_name,
  :request_models,
  :request_parameters,
  :route_key,
  :route_response_selection_expression,
  :target)
  include Aws::Structure
end

#route_keyString

After evaulating a selection expression, the result is compared against one or more selection keys to find a matching key. See Selection Expressions for a list of expressions and each expression's associated selection key type.

Returns:

  • (String)


1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
# File 'gems/aws-sdk-apigatewayv2/lib/aws-sdk-apigatewayv2/types.rb', line 1767

class CreateRouteRequest < Struct.new(
  :api_id,
  :api_key_required,
  :authorization_scopes,
  :authorization_type,
  :authorizer_id,
  :model_selection_expression,
  :operation_name,
  :request_models,
  :request_parameters,
  :route_key,
  :route_response_selection_expression,
  :target)
  include Aws::Structure
end

#route_response_selection_expressionString

An expression used to extract information at runtime. See Selection Expressions for more information.

Returns:

  • (String)


1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
# File 'gems/aws-sdk-apigatewayv2/lib/aws-sdk-apigatewayv2/types.rb', line 1767

class CreateRouteRequest < Struct.new(
  :api_id,
  :api_key_required,
  :authorization_scopes,
  :authorization_type,
  :authorizer_id,
  :model_selection_expression,
  :operation_name,
  :request_models,
  :request_parameters,
  :route_key,
  :route_response_selection_expression,
  :target)
  include Aws::Structure
end

#targetString

A string with a length between [1-128].

Returns:

  • (String)


1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
# File 'gems/aws-sdk-apigatewayv2/lib/aws-sdk-apigatewayv2/types.rb', line 1767

class CreateRouteRequest < Struct.new(
  :api_id,
  :api_key_required,
  :authorization_scopes,
  :authorization_type,
  :authorizer_id,
  :model_selection_expression,
  :operation_name,
  :request_models,
  :request_parameters,
  :route_key,
  :route_response_selection_expression,
  :target)
  include Aws::Structure
end