Class: AWSCDK::APIGateway::StepFunctionsRestAPIProps

Inherits:
RestAPIProps
  • Object
show all
Defined in:
api_gateway/step_functions_rest_api_props.rb

Overview

Properties for StepFunctionsRestApi.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(default_cors_preflight_options: nil, default_integration: nil, default_method_options: nil, cloud_watch_role: nil, cloud_watch_role_removal_policy: nil, deploy: nil, deploy_options: nil, description: nil, disable_execute_api_endpoint: nil, domain_name: nil, endpoint_configuration: nil, endpoint_export_name: nil, endpoint_types: nil, fail_on_warnings: nil, parameters: nil, policy: nil, rest_api_name: nil, retain_deployments: nil, api_key_source_type: nil, binary_media_types: nil, clone_from: nil, min_compression_size: nil, minimum_compression_size: nil, state_machine:, authorizer: nil, headers: nil, path: nil, querystring: nil, request_context: nil, role: nil, use_default_method_responses: nil) ⇒ StepFunctionsRestAPIProps

Returns a new instance of StepFunctionsRestAPIProps.

Parameters:

  • default_cors_preflight_options (AWSCDK::APIGateway::CorsOptions, nil) (defaults to: nil)

    Adds a CORS preflight OPTIONS method to this resource and all child resources.

  • default_integration (AWSCDK::APIGateway::Integration, nil) (defaults to: nil)

    An integration to use as a default for all methods created within this API unless an integration is specified.

  • default_method_options (AWSCDK::APIGateway::MethodOptions, nil) (defaults to: nil)

    Method options to use as a default for all methods created within this API unless custom options are specified.

  • cloud_watch_role (Boolean, nil) (defaults to: nil)

    Automatically configure an AWS CloudWatch role for API Gateway.

  • cloud_watch_role_removal_policy (AWSCDK::RemovalPolicy, nil) (defaults to: nil)

    The removal policy applied to the AWS CloudWatch role when this resource is removed from the application.

  • deploy (Boolean, nil) (defaults to: nil)

    Indicates if a Deployment should be automatically created for this API, and recreated when the API model (resources, methods) changes.

  • deploy_options (AWSCDK::APIGateway::StageOptions, nil) (defaults to: nil)

    Options for the API Gateway stage that will always point to the latest deployment when deploy is enabled.

  • description (String, nil) (defaults to: nil)

    A description of the RestApi construct.

  • disable_execute_api_endpoint (Boolean, nil) (defaults to: nil)

    Specifies whether clients can invoke the API using the default execute-api endpoint.

  • domain_name (AWSCDK::APIGateway::DomainNameOptions, nil) (defaults to: nil)

    Configure a custom domain name and map it to this API.

  • endpoint_configuration (AWSCDK::APIGateway::EndpointConfiguration, nil) (defaults to: nil)

    The EndpointConfiguration property type specifies the endpoint types of a REST API.

  • endpoint_export_name (String, nil) (defaults to: nil)

    Export name for the CfnOutput containing the API endpoint.

  • endpoint_types (Array<AWSCDK::APIGateway::EndpointType>, nil) (defaults to: nil)

    A list of the endpoint types of the API.

  • fail_on_warnings (Boolean, nil) (defaults to: nil)

    Indicates whether to roll back the resource if a warning occurs while API Gateway is creating the RestApi resource.

  • parameters (Hash{String => String}, nil) (defaults to: nil)

    Custom header parameters for the request.

  • policy (AWSCDK::IAM::PolicyDocument, nil) (defaults to: nil)

    A policy document that contains the permissions for this RestApi.

  • rest_api_name (String, nil) (defaults to: nil)

    A name for the API Gateway RestApi resource.

  • retain_deployments (Boolean, nil) (defaults to: nil)

    Retains old deployment resources when the API changes.

  • api_key_source_type (AWSCDK::APIGateway::APIKeySourceType, nil) (defaults to: nil)

    The source of the API key for metering requests according to a usage plan.

  • binary_media_types (Array<String>, nil) (defaults to: nil)

    The list of binary media mime-types that are supported by the RestApi resource, such as "image/png" or "application/octet-stream".

  • clone_from (AWSCDK::APIGateway::IRestAPI, nil) (defaults to: nil)

    The ID of the API Gateway RestApi resource that you want to clone.

  • min_compression_size (AWSCDK::Size, nil) (defaults to: nil)

    A Size(in bytes, kibibytes, mebibytes etc) that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (when undefined) on an API.

  • minimum_compression_size (Numeric, nil) (defaults to: nil)

    A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (when undefined) on an API.

  • state_machine (AWSCDK::StepFunctions::IStateMachine)

    The default State Machine that handles all requests from this API.

  • authorizer (Boolean, nil) (defaults to: nil)

    If the whole authorizer object, including custom context values should be in the execution input.

  • headers (Boolean, nil) (defaults to: nil)

    Check if header is to be included inside the execution input.

  • path (Boolean, nil) (defaults to: nil)

    Check if path is to be included inside the execution input.

  • querystring (Boolean, nil) (defaults to: nil)

    Check if querystring is to be included inside the execution input.

  • request_context (AWSCDK::APIGateway::RequestContext, nil) (defaults to: nil)

    Which details of the incoming request must be passed onto the underlying state machine, such as, account id, user identity, request id, etc.

  • role (AWSCDK::IAM::IRole, nil) (defaults to: nil)

    An IAM role that API Gateway will assume to start the execution of the state machine.

  • use_default_method_responses (Boolean, nil) (defaults to: nil)

    Whether to add default response models with 200, 400, and 500 status codes to the method.



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'api_gateway/step_functions_rest_api_props.rb', line 38

def initialize(default_cors_preflight_options: nil, default_integration: nil, default_method_options: nil, cloud_watch_role: nil, cloud_watch_role_removal_policy: nil, deploy: nil, deploy_options: nil, description: nil, disable_execute_api_endpoint: nil, domain_name: nil, endpoint_configuration: nil, endpoint_export_name: nil, endpoint_types: nil, fail_on_warnings: nil, parameters: nil, policy: nil, rest_api_name: nil, retain_deployments: nil, api_key_source_type: nil, binary_media_types: nil, clone_from: nil, min_compression_size: nil, minimum_compression_size: nil, state_machine:, authorizer: nil, headers: nil, path: nil, querystring: nil, request_context: nil, role: nil, use_default_method_responses: nil)
  @default_cors_preflight_options = default_cors_preflight_options.is_a?(Hash) ? ::AWSCDK::APIGateway::CorsOptions.new(**default_cors_preflight_options.transform_keys(&:to_sym)) : default_cors_preflight_options
  Jsii::Type.check_type(@default_cors_preflight_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5Db3JzT3B0aW9ucyJ9")), "defaultCorsPreflightOptions") unless @default_cors_preflight_options.nil?
  @default_integration = default_integration
  Jsii::Type.check_type(@default_integration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5JbnRlZ3JhdGlvbiJ9")), "defaultIntegration") unless @default_integration.nil?
  @default_method_options = default_method_options.is_a?(Hash) ? ::AWSCDK::APIGateway::MethodOptions.new(**default_method_options.transform_keys(&:to_sym)) : default_method_options
  Jsii::Type.check_type(@default_method_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5NZXRob2RPcHRpb25zIn0=")), "defaultMethodOptions") unless @default_method_options.nil?
  @cloud_watch_role = cloud_watch_role
  Jsii::Type.check_type(@cloud_watch_role, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "cloudWatchRole") unless @cloud_watch_role.nil?
  @cloud_watch_role_removal_policy = cloud_watch_role_removal_policy
  Jsii::Type.check_type(@cloud_watch_role_removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "cloudWatchRoleRemovalPolicy") unless @cloud_watch_role_removal_policy.nil?
  @deploy = deploy
  Jsii::Type.check_type(@deploy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "deploy") unless @deploy.nil?
  @deploy_options = deploy_options.is_a?(Hash) ? ::AWSCDK::APIGateway::StageOptions.new(**deploy_options.transform_keys(&:to_sym)) : deploy_options
  Jsii::Type.check_type(@deploy_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5TdGFnZU9wdGlvbnMifQ==")), "deployOptions") unless @deploy_options.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @disable_execute_api_endpoint = disable_execute_api_endpoint
  Jsii::Type.check_type(@disable_execute_api_endpoint, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "disableExecuteApiEndpoint") unless @disable_execute_api_endpoint.nil?
  @domain_name = domain_name.is_a?(Hash) ? ::AWSCDK::APIGateway::DomainNameOptions.new(**domain_name.transform_keys(&:to_sym)) : domain_name
  Jsii::Type.check_type(@domain_name, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5Eb21haW5OYW1lT3B0aW9ucyJ9")), "domainName") unless @domain_name.nil?
  @endpoint_configuration = endpoint_configuration.is_a?(Hash) ? ::AWSCDK::APIGateway::EndpointConfiguration.new(**endpoint_configuration.transform_keys(&:to_sym)) : endpoint_configuration
  Jsii::Type.check_type(@endpoint_configuration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5FbmRwb2ludENvbmZpZ3VyYXRpb24ifQ==")), "endpointConfiguration") unless @endpoint_configuration.nil?
  @endpoint_export_name = endpoint_export_name
  Jsii::Type.check_type(@endpoint_export_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "endpointExportName") unless @endpoint_export_name.nil?
  @endpoint_types = endpoint_types
  Jsii::Type.check_type(@endpoint_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcGlnYXRld2F5LkVuZHBvaW50VHlwZSJ9LCJraW5kIjoiYXJyYXkifX0=")), "endpointTypes") unless @endpoint_types.nil?
  @fail_on_warnings = fail_on_warnings
  Jsii::Type.check_type(@fail_on_warnings, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "failOnWarnings") unless @fail_on_warnings.nil?
  @parameters = parameters
  Jsii::Type.check_type(@parameters, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "parameters") unless @parameters.nil?
  @policy = policy
  Jsii::Type.check_type(@policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLlBvbGljeURvY3VtZW50In0=")), "policy") unless @policy.nil?
  @rest_api_name = rest_api_name
  Jsii::Type.check_type(@rest_api_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "restApiName") unless @rest_api_name.nil?
  @retain_deployments = retain_deployments
  Jsii::Type.check_type(@retain_deployments, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "retainDeployments") unless @retain_deployments.nil?
  @api_key_source_type = api_key_source_type
  Jsii::Type.check_type(@api_key_source_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5BcGlLZXlTb3VyY2VUeXBlIn0=")), "apiKeySourceType") unless @api_key_source_type.nil?
  @binary_media_types = binary_media_types
  Jsii::Type.check_type(@binary_media_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "binaryMediaTypes") unless @binary_media_types.nil?
  @clone_from = clone_from
  Jsii::Type.check_type(@clone_from, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5JUmVzdEFwaSJ9")), "cloneFrom") unless @clone_from.nil?
  @min_compression_size = min_compression_size
  Jsii::Type.check_type(@min_compression_size, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5TaXplIn0=")), "minCompressionSize") unless @min_compression_size.nil?
  @minimum_compression_size = minimum_compression_size
  Jsii::Type.check_type(@minimum_compression_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "minimumCompressionSize") unless @minimum_compression_size.nil?
  @state_machine = state_machine
  Jsii::Type.check_type(@state_machine, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9ucy5JU3RhdGVNYWNoaW5lIn0=")), "stateMachine")
  @authorizer = authorizer
  Jsii::Type.check_type(@authorizer, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "authorizer") unless @authorizer.nil?
  @headers = headers
  Jsii::Type.check_type(@headers, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "headers") unless @headers.nil?
  @path = path
  Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "path") unless @path.nil?
  @querystring = querystring
  Jsii::Type.check_type(@querystring, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "querystring") unless @querystring.nil?
  @request_context = request_context.is_a?(Hash) ? ::AWSCDK::APIGateway::RequestContext.new(**request_context.transform_keys(&:to_sym)) : request_context
  Jsii::Type.check_type(@request_context, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5SZXF1ZXN0Q29udGV4dCJ9")), "requestContext") unless @request_context.nil?
  @role = role
  Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil?
  @use_default_method_responses = use_default_method_responses
  Jsii::Type.check_type(@use_default_method_responses, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "useDefaultMethodResponses") unless @use_default_method_responses.nil?
end

Instance Attribute Details

#api_key_source_typeAWSCDK::APIGateway::APIKeySourceType? (readonly)

Note:

Default: - Metering is disabled.

The source of the API key for metering requests according to a usage plan.



232
233
234
# File 'api_gateway/step_functions_rest_api_props.rb', line 232

def api_key_source_type
  @api_key_source_type
end

#authorizerBoolean? (readonly)

Note:

Default: false

If the whole authorizer object, including custom context values should be in the execution input.

The execution input will include a new key authorizer:

{ "body": {}, "authorizer": { "key": "value" } }

Returns:

  • (Boolean, nil)


284
285
286
# File 'api_gateway/step_functions_rest_api_props.rb', line 284

def authorizer
  @authorizer
end

#binary_media_typesArray<String>? (readonly)

Note:

Default: - RestApi supports only UTF-8-encoded text payloads.

The list of binary media mime-types that are supported by the RestApi resource, such as "image/png" or "application/octet-stream".

Returns:

  • (Array<String>, nil)


237
238
239
# File 'api_gateway/step_functions_rest_api_props.rb', line 237

def binary_media_types
  @binary_media_types
end

#clone_fromAWSCDK::APIGateway::IRestAPI? (readonly)

Note:

Default: - None.

The ID of the API Gateway RestApi resource that you want to clone.



242
243
244
# File 'api_gateway/step_functions_rest_api_props.rb', line 242

def clone_from
  @clone_from
end

#cloud_watch_roleBoolean? (readonly)

Note:

Default: - false if @aws-cdk/aws-apigateway:disableCloudWatchRole is enabled, true otherwise

Automatically configure an AWS CloudWatch role for API Gateway.

Returns:

  • (Boolean, nil)


124
125
126
# File 'api_gateway/step_functions_rest_api_props.rb', line 124

def cloud_watch_role
  @cloud_watch_role
end

#cloud_watch_role_removal_policyAWSCDK::RemovalPolicy? (readonly)

Note:

Default: - RemovalPolicy.RETAIN

The removal policy applied to the AWS CloudWatch role when this resource is removed from the application.

Requires cloud_watch_role to be enabled.

Returns:



131
132
133
# File 'api_gateway/step_functions_rest_api_props.rb', line 131

def cloud_watch_role_removal_policy
  @cloud_watch_role_removal_policy
end

#default_cors_preflight_optionsAWSCDK::APIGateway::CorsOptions? (readonly)

Note:

Default: - CORS is disabled

Adds a CORS preflight OPTIONS method to this resource and all child resources.

You can add CORS at the resource-level using add_cors_preflight.



109
110
111
# File 'api_gateway/step_functions_rest_api_props.rb', line 109

def default_cors_preflight_options
  @default_cors_preflight_options
end

#default_integrationAWSCDK::APIGateway::Integration? (readonly)

Note:

Default: - Inherited from parent.

An integration to use as a default for all methods created within this API unless an integration is specified.



114
115
116
# File 'api_gateway/step_functions_rest_api_props.rb', line 114

def default_integration
  @default_integration
end

#default_method_optionsAWSCDK::APIGateway::MethodOptions? (readonly)

Note:

Default: - Inherited from parent.

Method options to use as a default for all methods created within this API unless custom options are specified.



119
120
121
# File 'api_gateway/step_functions_rest_api_props.rb', line 119

def default_method_options
  @default_method_options
end

#deployBoolean? (readonly)

Note:

Default: true

Indicates if a Deployment should be automatically created for this API, and recreated when the API model (resources, methods) changes.

Since API Gateway deployments are immutable, When this option is enabled (by default), an AWS::ApiGateway::Deployment resource will automatically created with a logical ID that hashes the API model (methods, resources and options). This means that when the model changes, the logical ID of this CloudFormation resource will change, and a new deployment will be created.

If this is set, latest_deployment will refer to the Deployment object and deployment_stage will refer to a Stage that points to this deployment. To customize the stage options, use the deploy_options property.

A CloudFormation Output will also be defined with the root URL endpoint of this REST API.

Returns:

  • (Boolean, nil)


151
152
153
# File 'api_gateway/step_functions_rest_api_props.rb', line 151

def deploy
  @deploy
end

#deploy_optionsAWSCDK::APIGateway::StageOptions? (readonly)

Note:

Default: - Based on defaults of StageOptions.

Options for the API Gateway stage that will always point to the latest deployment when deploy is enabled.

If deploy is disabled, this value cannot be set.



159
160
161
# File 'api_gateway/step_functions_rest_api_props.rb', line 159

def deploy_options
  @deploy_options
end

#descriptionString? (readonly)

Note:

Default: - 'Automatically created by the RestApi construct'

A description of the RestApi construct.

Returns:

  • (String, nil)


164
165
166
# File 'api_gateway/step_functions_rest_api_props.rb', line 164

def description
  @description
end

#disable_execute_api_endpointBoolean? (readonly)

Note:

Default: false

Specifies whether clients can invoke the API using the default execute-api endpoint.

To require that clients use a custom domain name to invoke the API, disable the default endpoint.



173
174
175
# File 'api_gateway/step_functions_rest_api_props.rb', line 173

def disable_execute_api_endpoint
  @disable_execute_api_endpoint
end

#domain_nameAWSCDK::APIGateway::DomainNameOptions? (readonly)

Note:

Default: - no domain name is defined, use addDomainName or directly define a DomainName.

Configure a custom domain name and map it to this API.



178
179
180
# File 'api_gateway/step_functions_rest_api_props.rb', line 178

def domain_name
  @domain_name
end

#endpoint_configurationAWSCDK::APIGateway::EndpointConfiguration? (readonly)

Note:

Default: EndpointType.EDGE

The EndpointConfiguration property type specifies the endpoint types of a REST API.



184
185
186
# File 'api_gateway/step_functions_rest_api_props.rb', line 184

def endpoint_configuration
  @endpoint_configuration
end

#endpoint_export_nameString? (readonly)

Note:

Default: - when no export name is given, output will be created without export

Export name for the CfnOutput containing the API endpoint.

Returns:

  • (String, nil)


189
190
191
# File 'api_gateway/step_functions_rest_api_props.rb', line 189

def endpoint_export_name
  @endpoint_export_name
end

#endpoint_typesArray<AWSCDK::APIGateway::EndpointType>? (readonly)

Note:

Default: EndpointType.EDGE

A list of the endpoint types of the API.

Use this property when creating an API.

Returns:



197
198
199
# File 'api_gateway/step_functions_rest_api_props.rb', line 197

def endpoint_types
  @endpoint_types
end

#fail_on_warningsBoolean? (readonly)

Note:

Default: false

Indicates whether to roll back the resource if a warning occurs while API Gateway is creating the RestApi resource.

Returns:

  • (Boolean, nil)


202
203
204
# File 'api_gateway/step_functions_rest_api_props.rb', line 202

def fail_on_warnings
  @fail_on_warnings
end

#headersBoolean? (readonly)

Note:

Default: false

Check if header is to be included inside the execution input.

The execution input will include a new key headers:

{ "body": {}, "headers": { "header1": "value", "header2": "value" } }

Returns:

  • (Boolean, nil)


299
300
301
# File 'api_gateway/step_functions_rest_api_props.rb', line 299

def headers
  @headers
end

#min_compression_sizeAWSCDK::Size? (readonly)

Note:

Default: - Compression is disabled.

A Size(in bytes, kibibytes, mebibytes etc) that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (when undefined) on an API.

When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.

Returns:



252
253
254
# File 'api_gateway/step_functions_rest_api_props.rb', line 252

def min_compression_size
  @min_compression_size
end

#minimum_compression_sizeNumeric? (readonly)

Deprecated.
  • superseded by minCompressionSize
Note:

Default: - Compression is disabled.

A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (when undefined) on an API.

When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.

Returns:

  • (Numeric, nil)


263
264
265
# File 'api_gateway/step_functions_rest_api_props.rb', line 263

def minimum_compression_size
  @minimum_compression_size
end

#parametersHash{String => String}? (readonly)

Note:

Default: - No parameters.

Custom header parameters for the request.



208
209
210
# File 'api_gateway/step_functions_rest_api_props.rb', line 208

def parameters
  @parameters
end

#pathBoolean? (readonly)

Note:

Default: true

Check if path is to be included inside the execution input.

The execution input will include a new key path:

{ "body": {}, "path": { "resourceName": "resourceValue" } }

Returns:

  • (Boolean, nil)


313
314
315
# File 'api_gateway/step_functions_rest_api_props.rb', line 313

def path
  @path
end

#policyAWSCDK::IAM::PolicyDocument? (readonly)

Note:

Default: - No policy.

A policy document that contains the permissions for this RestApi.

Returns:



213
214
215
# File 'api_gateway/step_functions_rest_api_props.rb', line 213

def policy
  @policy
end

#querystringBoolean? (readonly)

Note:

Default: true

Check if querystring is to be included inside the execution input.

The execution input will include a new key query_string:

{ "body": {}, "querystring": { "key": "value" } }

Returns:

  • (Boolean, nil)


327
328
329
# File 'api_gateway/step_functions_rest_api_props.rb', line 327

def querystring
  @querystring
end

#request_contextAWSCDK::APIGateway::RequestContext? (readonly)

Note:

Default: - all parameters within request context will be set as false

Which details of the incoming request must be passed onto the underlying state machine, such as, account id, user identity, request id, etc.

The execution input will include a new key request_context:

{ "body": {}, "requestContext": { "key": "value" } }



341
342
343
# File 'api_gateway/step_functions_rest_api_props.rb', line 341

def request_context
  @request_context
end

#rest_api_nameString? (readonly)

Note:

Default: - ID of the RestApi construct.

A name for the API Gateway RestApi resource.

Returns:

  • (String, nil)


218
219
220
# File 'api_gateway/step_functions_rest_api_props.rb', line 218

def rest_api_name
  @rest_api_name
end

#retain_deploymentsBoolean? (readonly)

Note:

Default: false

Retains old deployment resources when the API changes.

This allows manually reverting stages to point to old deployments via the AWS Console.

Returns:

  • (Boolean, nil)


227
228
229
# File 'api_gateway/step_functions_rest_api_props.rb', line 227

def retain_deployments
  @retain_deployments
end

#roleAWSCDK::IAM::IRole? (readonly)

Note:

Default: - a new role is created

An IAM role that API Gateway will assume to start the execution of the state machine.

Returns:



346
347
348
# File 'api_gateway/step_functions_rest_api_props.rb', line 346

def role
  @role
end

#state_machineAWSCDK::StepFunctions::IStateMachine (readonly)

The default State Machine that handles all requests from this API.

This stateMachine will be used as the default integration for all methods in this API, unless specified otherwise in add_method.



270
271
272
# File 'api_gateway/step_functions_rest_api_props.rb', line 270

def state_machine
  @state_machine
end

#use_default_method_responsesBoolean? (readonly)

Note:

Default: true

Whether to add default response models with 200, 400, and 500 status codes to the method.

Returns:

  • (Boolean, nil)


351
352
353
# File 'api_gateway/step_functions_rest_api_props.rb', line 351

def use_default_method_responses
  @use_default_method_responses
end

Class Method Details

.jsii_propertiesObject



353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
# File 'api_gateway/step_functions_rest_api_props.rb', line 353

def self.jsii_properties
  {
    :default_cors_preflight_options => "defaultCorsPreflightOptions",
    :default_integration => "defaultIntegration",
    :default_method_options => "defaultMethodOptions",
    :cloud_watch_role => "cloudWatchRole",
    :cloud_watch_role_removal_policy => "cloudWatchRoleRemovalPolicy",
    :deploy => "deploy",
    :deploy_options => "deployOptions",
    :description => "description",
    :disable_execute_api_endpoint => "disableExecuteApiEndpoint",
    :domain_name => "domainName",
    :endpoint_configuration => "endpointConfiguration",
    :endpoint_export_name => "endpointExportName",
    :endpoint_types => "endpointTypes",
    :fail_on_warnings => "failOnWarnings",
    :parameters => "parameters",
    :policy => "policy",
    :rest_api_name => "restApiName",
    :retain_deployments => "retainDeployments",
    :api_key_source_type => "apiKeySourceType",
    :binary_media_types => "binaryMediaTypes",
    :clone_from => "cloneFrom",
    :min_compression_size => "minCompressionSize",
    :minimum_compression_size => "minimumCompressionSize",
    :state_machine => "stateMachine",
    :authorizer => "authorizer",
    :headers => "headers",
    :path => "path",
    :querystring => "querystring",
    :request_context => "requestContext",
    :role => "role",
    :use_default_method_responses => "useDefaultMethodResponses",
  }
end

Instance Method Details

#to_jsiiObject



389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
# File 'api_gateway/step_functions_rest_api_props.rb', line 389

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "defaultCorsPreflightOptions" => @default_cors_preflight_options,
    "defaultIntegration" => @default_integration,
    "defaultMethodOptions" => @default_method_options,
    "cloudWatchRole" => @cloud_watch_role,
    "cloudWatchRoleRemovalPolicy" => @cloud_watch_role_removal_policy,
    "deploy" => @deploy,
    "deployOptions" => @deploy_options,
    "description" => @description,
    "disableExecuteApiEndpoint" => @disable_execute_api_endpoint,
    "domainName" => @domain_name,
    "endpointConfiguration" => @endpoint_configuration,
    "endpointExportName" => @endpoint_export_name,
    "endpointTypes" => @endpoint_types,
    "failOnWarnings" => @fail_on_warnings,
    "parameters" => @parameters,
    "policy" => @policy,
    "restApiName" => @rest_api_name,
    "retainDeployments" => @retain_deployments,
    "apiKeySourceType" => @api_key_source_type,
    "binaryMediaTypes" => @binary_media_types,
    "cloneFrom" => @clone_from,
    "minCompressionSize" => @min_compression_size,
    "minimumCompressionSize" => @minimum_compression_size,
    "stateMachine" => @state_machine,
    "authorizer" => @authorizer,
    "headers" => @headers,
    "path" => @path,
    "querystring" => @querystring,
    "requestContext" => @request_context,
    "role" => @role,
    "useDefaultMethodResponses" => @use_default_method_responses,
  })
  result.compact
end