Class: AWSCDK::APIGateway::CfnDocumentationPart::LocationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
api_gateway/cfn_documentation_part.rb

Overview

The Location property specifies the location of the Amazon API Gateway API entity that the documentation applies to.

Location is a property of the AWS::ApiGateway::DocumentationPart resource.

For more information about each property, including constraints and valid values, see DocumentationPart in the Amazon API Gateway REST API Reference .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method: nil, name: nil, path: nil, status_code: nil, type: nil) ⇒ LocationProperty

Returns a new instance of LocationProperty.

Parameters:

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

    The HTTP verb of a method.

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

    The name of the targeted API entity.

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

    The URL path of the target.

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

    The HTTP status code of a response.

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

    The type of API entity to which the documentation content applies.



537
538
539
540
541
542
543
544
545
546
547
548
# File 'api_gateway/cfn_documentation_part.rb', line 537

def initialize(method: nil, name: nil, path: nil, status_code: nil, type: nil)
  @method = method
  Jsii::Type.check_type(@method, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "method") unless @method.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @path = path
  Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path") unless @path.nil?
  @status_code = status_code
  Jsii::Type.check_type(@status_code, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "statusCode") unless @status_code.nil?
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") unless @type.nil?
end

Instance Attribute Details

#methodString? (readonly)

The HTTP verb of a method.

It is a valid field for the API entity types of METHOD , PATH_PARAMETER , QUERY_PARAMETER , REQUEST_HEADER , REQUEST_BODY , RESPONSE , RESPONSE_HEADER , and RESPONSE_BODY . The default value is * for any method. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's method attribute must match that of the parent entity exactly.



556
557
558
# File 'api_gateway/cfn_documentation_part.rb', line 556

def method
  @method
end

#nameString? (readonly)

The name of the targeted API entity.

It is a valid and required field for the API entity types of AUTHORIZER , MODEL , PATH_PARAMETER , QUERY_PARAMETER , REQUEST_HEADER , REQUEST_BODY and RESPONSE_HEADER . It is an invalid field for any other entity type.



563
564
565
# File 'api_gateway/cfn_documentation_part.rb', line 563

def name
  @name
end

#pathString? (readonly)

The URL path of the target.

It is a valid field for the API entity types of RESOURCE , METHOD , PATH_PARAMETER , QUERY_PARAMETER , REQUEST_HEADER , REQUEST_BODY , RESPONSE , RESPONSE_HEADER , and RESPONSE_BODY . The default value is / for the root resource. When an applicable child entity inherits the content of another entity of the same type with more general specifications of the other location attributes, the child entity's path attribute must match that of the parent entity as a prefix.



570
571
572
# File 'api_gateway/cfn_documentation_part.rb', line 570

def path
  @path
end

#status_codeString? (readonly)

The HTTP status code of a response.

It is a valid field for the API entity types of RESPONSE , RESPONSE_HEADER , and RESPONSE_BODY . The default value is * for any status code. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's status_code attribute must match that of the parent entity exactly.



577
578
579
# File 'api_gateway/cfn_documentation_part.rb', line 577

def status_code
  @status_code
end

#typeString? (readonly)

The type of API entity to which the documentation content applies.

Valid values are API , AUTHORIZER , MODEL , RESOURCE , METHOD , PATH_PARAMETER , QUERY_PARAMETER , REQUEST_HEADER , REQUEST_BODY , RESPONSE , RESPONSE_HEADER , and RESPONSE_BODY . Content inheritance does not apply to any entity of the API , AUTHORIZER , METHOD , MODEL , REQUEST_BODY , or RESOURCE type.



584
585
586
# File 'api_gateway/cfn_documentation_part.rb', line 584

def type
  @type
end

Class Method Details

.jsii_propertiesObject



586
587
588
589
590
591
592
593
594
# File 'api_gateway/cfn_documentation_part.rb', line 586

def self.jsii_properties
  {
    :method => "method",
    :name => "name",
    :path => "path",
    :status_code => "statusCode",
    :type => "type",
  }
end

Instance Method Details

#to_jsiiObject



596
597
598
599
600
601
602
603
604
605
606
# File 'api_gateway/cfn_documentation_part.rb', line 596

def to_jsii
  result = {}
  result.merge!({
    "method" => @method,
    "name" => @name,
    "path" => @path,
    "statusCode" => @status_code,
    "type" => @type,
  })
  result.compact
end