Class: AWSCDK::APIGateway::DeploymentProps

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api:, description: nil, retain_deployments: nil, stage_name: nil) ⇒ DeploymentProps

Returns a new instance of DeploymentProps.

Parameters:

  • api (AWSCDK::APIGateway::IRestAPI)

    The Rest API to deploy.

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

    A description of the purpose of the API Gateway deployment.

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

    When an API Gateway model is updated, a new deployment will automatically be created.

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

    The name of the stage the API Gateway deployment deploys to.



10
11
12
13
14
15
16
17
18
19
# File 'api_gateway/deployment_props.rb', line 10

def initialize(api:, description: nil, retain_deployments: nil, stage_name: nil)
  @api = api
  Jsii::Type.check_type(@api, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5JUmVzdEFwaSJ9")), "api")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @retain_deployments = retain_deployments
  Jsii::Type.check_type(@retain_deployments, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "retainDeployments") unless @retain_deployments.nil?
  @stage_name = stage_name
  Jsii::Type.check_type(@stage_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stageName") unless @stage_name.nil?
end

Instance Attribute Details

#apiAWSCDK::APIGateway::IRestAPI (readonly)

The Rest API to deploy.



24
25
26
# File 'api_gateway/deployment_props.rb', line 24

def api
  @api
end

#descriptionString? (readonly)

Note:

Default: - No description.

A description of the purpose of the API Gateway deployment.

Returns:

  • (String, nil)


29
30
31
# File 'api_gateway/deployment_props.rb', line 29

def description
  @description
end

#retain_deploymentsBoolean? (readonly)

Note:

Default: false

When an API Gateway model is updated, a new deployment will automatically be created.

If this is true, the old API Gateway Deployment resource will not be deleted. This will allow manually reverting back to a previous deployment in case for example

Returns:

  • (Boolean, nil)


37
38
39
# File 'api_gateway/deployment_props.rb', line 37

def retain_deployments
  @retain_deployments
end

#stage_nameString? (readonly)

Note:

Default: - No stage name. If the stageName property is set but a stage with the corresponding name does not exist, a new stage resource will be created with the provided stage name.

The name of the stage the API Gateway deployment deploys to.

Returns:

  • (String, nil)


42
43
44
# File 'api_gateway/deployment_props.rb', line 42

def stage_name
  @stage_name
end

Class Method Details

.jsii_propertiesObject



44
45
46
47
48
49
50
51
# File 'api_gateway/deployment_props.rb', line 44

def self.jsii_properties
  {
    :api => "api",
    :description => "description",
    :retain_deployments => "retainDeployments",
    :stage_name => "stageName",
  }
end

Instance Method Details

#to_jsiiObject



53
54
55
56
57
58
59
60
61
62
# File 'api_gateway/deployment_props.rb', line 53

def to_jsii
  result = {}
  result.merge!({
    "api" => @api,
    "description" => @description,
    "retainDeployments" => @retain_deployments,
    "stageName" => @stage_name,
  })
  result.compact
end