Class: AWSCDK::QBusiness::CfnPlugin::APISchemaProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
q_business/cfn_plugin.rb

Overview

Contains details about the OpenAPI schema for a custom plugin.

For more information, see custom plugin OpenAPI schemas . You can either include the schema directly in the payload field or you can upload it to an S3 bucket and specify the S3 bucket location in the s3 field.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload: nil, s3: nil) ⇒ APISchemaProperty

Returns a new instance of APISchemaProperty.

Parameters:

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

    The JSON or YAML-formatted payload defining the OpenAPI schema for a custom plugin.

  • s3 (AWSCDK::IResolvable, AWSCDK::QBusiness::CfnPlugin::S3Property, nil) (defaults to: nil)

    Contains details about the S3 object containing the OpenAPI schema for a custom plugin.



647
648
649
650
651
652
# File 'q_business/cfn_plugin.rb', line 647

def initialize(payload: nil, s3: nil)
  @payload = payload
  Jsii::Type.check_type(@payload, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "payload") unless @payload.nil?
  @s3 = s3.is_a?(Hash) ? ::AWSCDK::QBusiness::CfnPlugin::S3Property.new(**s3.transform_keys(&:to_sym)) : s3
  Jsii::Type.check_type(@s3, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xYnVzaW5lc3MuQ2ZuUGx1Z2luLlMzUHJvcGVydHkifV19fQ==")), "s3") unless @s3.nil?
end

Instance Attribute Details

#payloadString? (readonly)

The JSON or YAML-formatted payload defining the OpenAPI schema for a custom plugin.



658
659
660
# File 'q_business/cfn_plugin.rb', line 658

def payload
  @payload
end

#s3AWSCDK::IResolvable, ... (readonly)

Contains details about the S3 object containing the OpenAPI schema for a custom plugin.

The schema could be in either JSON or YAML format.



665
666
667
# File 'q_business/cfn_plugin.rb', line 665

def s3
  @s3
end

Class Method Details

.jsii_propertiesObject



667
668
669
670
671
672
# File 'q_business/cfn_plugin.rb', line 667

def self.jsii_properties
  {
    :payload => "payload",
    :s3 => "s3",
  }
end

Instance Method Details

#to_jsiiObject



674
675
676
677
678
679
680
681
# File 'q_business/cfn_plugin.rb', line 674

def to_jsii
  result = {}
  result.merge!({
    "payload" => @payload,
    "s3" => @s3,
  })
  result.compact
end