Class: Aws::APIPortal::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb

Overview

An API client for APIPortal. To construct a client, you need to configure a :region and :credentials.

client = Aws::APIPortal::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

For details on configuring region and credentials see the developer guide.

See #initialize for a full list of supported configuration options.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :plugins (Array<Seahorse::Client::Plugin>) — default: []] —

    A list of plugins to apply to the client. Each plugin is either a class name or an instance of a plugin class.

  • :credentials (required, Aws::CredentialProvider) —

    Your AWS credentials used for authentication. This can be any class that includes and implements Aws::CredentialProvider, or instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::SharedCredentials - Used for loading static credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    • Aws::AssumeRoleWebIdentityCredentials - Used when you need to assume a role after providing credentials via the web.

    • Aws::SSOCredentials - Used for loading credentials from AWS SSO using an access token generated from aws login.

    • Aws::ProcessCredentials - Used for loading credentials from a process that outputs to stdout.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::ECSCredentials - Used for loading credentials from instances running in ECS.

    • Aws::CognitoIdentityCredentials - Used for loading credentials from the Cognito Identity service.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]

    • The :access_key_id, :secret_access_key, :session_token, and :account_id options.

    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'], ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID'].

    • ~/.aws/credentials

    • ~/.aws/config

    • EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentials or Aws::ECSCredentials to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED'] to true.

  • :region (required, String) —

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is searched for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :account_id (String)
  • :active_endpoint_cache (Boolean) — default: false —

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false.

  • :adaptive_retry_wait_to_fill (Boolean) — default: true —

    Used only in adaptive retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a RetryCapacityNotAvailableError and will not retry instead of sleeping.

  • :auth_scheme_preference (Array<String>) —

    A list of preferred authentication schemes to use when making a request. Supported values are: sigv4, sigv4a, httpBearerAuth, and noAuth. When set using ENV['AWS_AUTH_SCHEME_PREFERENCE'] or in shared config as auth_scheme_preference, the value should be a comma-separated list.

  • :client_side_monitoring (Boolean) — default: false —

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: "" —

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1" —

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000 —

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher —

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true —

    When true, an attempt is made to coerce request parameters into the required types.

  • :correct_clock_skew (Boolean) — default: true —

    Used only in standard and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks. Takes effect only when disable_clock_skew_correction is not set.

  • :defaults_mode (String) — default: "legacy" —

    See DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.

  • :disable_clock_skew_correction (Boolean) —

    Used only in standard and adaptive retry modes. When true, the SDK does not apply a clock skew correction, does not update its stored skew from responses, and does not retry clock skew errors. Clock skew correction is enabled by default.

  • :disable_host_prefix_injection (Boolean) — default: false —

    When true, the SDK will not prepend the modeled host prefix to the endpoint.

  • :disable_request_compression (Boolean) — default: false —

    When set to 'true' the request body will not be compressed for supported operations.

  • :endpoint (String, URI::HTTPS, URI::HTTP) —

    Normally you should not configure the :endpoint option directly. This is normally constructed from the :region option. Configuring :endpoint is normally reserved for connecting to test or custom endpoints. The endpoint should be a URI formatted like:

    'http://example.com'
    'https://example.com'
    'http://example.com:123'
    
  • :endpoint_cache_max_entries (Integer) — default: 1000 —

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10 —

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60 —

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false —

    When set to true, endpoint discovery will be enabled for operations when available.

  • :ignore_configured_endpoint_urls (Boolean) —

    Setting to true disables use of endpoint URLs provided via environment variables and the shared configuration file.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default —

    The log formatter.

  • :log_level (Symbol) — default: :info —

    The log level to send messages to the :logger at.

  • :logger (Logger) —

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :max_attempts (Integer) — default: 3 —

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in standard and adaptive retry modes. Defaults to 3, except for DynamoDB and DynamoDB Streams, which default to 4.

  • :profile (String) — default: "default" —

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :request_checksum_calculation (String) — default: "when_supported" —

    Determines when a checksum will be calculated for request payloads. Values are:

    • when_supported - (default) When set, a checksum will be calculated for all request payloads of operations modeled with the httpChecksum trait where requestChecksumRequired is true and/or a requestAlgorithmMember is modeled.
    • when_required - When set, a checksum will only be calculated for request payloads of operations modeled with the httpChecksum trait where requestChecksumRequired is true or where a requestAlgorithmMember is modeled and supplied.
  • :request_min_compression_size_bytes (Integer) — default: 10240 —

    The minimum size in bytes that triggers compression for request bodies. The value must be non-negative integer value between 0 and 10485780 bytes inclusive.

  • :response_checksum_validation (String) — default: "when_supported" —

    Determines when checksum validation will be performed on response payloads. Values are:

    • when_supported - (default) When set, checksum validation is performed on all response payloads of operations modeled with the httpChecksum trait where responseAlgorithms is modeled, except when no modeled checksum algorithms are supported.
    • when_required - When set, checksum validation is not performed on response payloads of operations unless the checksum algorithm is supported and the requestValidationModeMember member is set to ENABLED.
  • :retry_backoff (Proc) —

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the legacy retry mode.

  • :retry_base_delay (Float) — default: 0.3 —

    The base delay in seconds used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_jitter (Symbol) — default: :none —

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the legacy retry mode.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3 —

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the legacy retry mode.

  • :retry_max_delay (Integer) — default: 0 —

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_mode (String) — default: "standard" —

    Specifies which retry algorithm to use. Values are:

    • legacy - The pre-existing retry behavior.

    • standard - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make. This is the default value if no retry mode is provided.

    • adaptive - A retry mode that includes all the functionality of standard mode along with automatic client side throttling.

  • :sdk_ua_app_id (String) —

    A unique and opaque application ID that is appended to the User-Agent header as app/sdk_ua_app_id. It should have a maximum length of 50. This variable is sourced from environment variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.

  • :secret_access_key (String)
  • :session_token (String)
  • :sigv4a_signing_region_set (Array) —

    A list of regions that should be signed with SigV4a signing. When not passed, a default :sigv4a_signing_region_set is searched for in the following locations:

    • Aws.config[:sigv4a_signing_region_set]
    • ENV['AWS_SIGV4A_SIGNING_REGION_SET']
    • ~/.aws/config
  • :stub_responses (Boolean) — default: false —

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :telemetry_provider (Aws::Telemetry::TelemetryProviderBase) — default: Aws::Telemetry::NoOpTelemetryProvider —

    Allows you to provide a telemetry provider, which is used to emit telemetry data. By default, uses NoOpTelemetryProvider which will not record or emit any telemetry data. The SDK supports the following telemetry providers:

    • OpenTelemetry (OTel) - To use the OTel provider, install and require the opentelemetry-sdk gem and then, pass in an instance of a Aws::Telemetry::OTelProvider for telemetry provider.
  • :token_provider (Aws::TokenProvider) —

    Your Bearer token used for authentication. This can be any class that includes and implements Aws::TokenProvider, or instance of any one of the following classes:

    • Aws::StaticTokenProvider - Used for configuring static, non-refreshing tokens.

    • Aws::SSOTokenProvider - Used for loading tokens from AWS SSO using an access token generated from aws login.

    When :token_provider is not configured directly, the Aws::TokenProviderChain will be used to search for tokens configured for your profile in shared configuration files.

  • :use_dualstack_endpoint (Boolean) —

    When set to true, dualstack enabled endpoints (with .aws TLD) will be used if available.

  • :use_fips_endpoint (Boolean) —

    When set to true, fips compatible endpoints will be used if available. When a fips region is used, the region is normalized and this config is set to true.

  • :validate_params (Boolean) — default: true —

    When true, request parameters are validated before sending the request.

  • :endpoint_provider (Aws::APIPortal::EndpointProvider) —

    The endpoint provider used to resolve endpoints. Any object that responds to #resolve_endpoint(parameters) where parameters is a Struct similar to Aws::APIPortal::EndpointParameters.

  • :http_continue_timeout (Float) — default: 1 —

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session.

  • :http_idle_timeout (Float) — default: 5 —

    The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_open_timeout (Float) — default: 15 —

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_proxy (URI::HTTP, String) —

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_read_timeout (Float) — default: 60 —

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_wire_trace (Boolean) — default: false —

    When true, HTTP debug output will be sent to the :logger.

  • :on_chunk_received (Proc) —

    When a Proc object is provided, it will be used as callback when each chunk of the response body is received. It provides three arguments: the chunk, the number of bytes received, and the total number of bytes in the response (or nil if the server did not send a content-length).

  • :on_chunk_sent (Proc) —

    When a Proc object is provided, it will be used as callback when each chunk of the request body is sent. It provides three arguments: the chunk, the number of bytes read from the body, and the total number of bytes in the body.

  • :raise_response_errors (Boolean) — default: true —

    When true, response errors are raised.

  • :ssl_ca_bundle (String) —

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String) —

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_store (String) —

    Sets the X509::Store to verify peer certificate.

  • :ssl_cert (OpenSSL::X509::Certificate) —

    Sets a client certificate when creating http connections.

  • :ssl_key (OpenSSL::PKey) —

    Sets a client key when creating http connections.

  • :ssl_timeout (Float) —

    Sets the SSL timeout in seconds

  • :ssl_verify_peer (Boolean) — default: true —

    When true, SSL peer certificates are verified when establishing a connection.



479
480
481
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 479

def initialize(*args)
  super
end

Instance Method Details

#associate_managed_apis(params = {}) ⇒ Types::AssociateManagedApisResponse

Associate one or more Managed APIs with a product. Best-effort — IDs that fail are returned in AssociateManagedApisResponse#failedItems; IDs that succeed are omitted. Associating an already-associated Managed API is a no-op (not reported as failure).

Examples:

Request syntax with placeholder values


resp = client.associate_managed_apis({
  product_id: "ProductId", # required
  managed_api_ids: ["ManagedApiId"], # required
})

Response structure


resp.failed_items #=> Array
resp.failed_items[0].managed_api_id #=> String
resp.failed_items[0].error_code #=> String, one of "MANAGED_API_NOT_FOUND", "INTERNAL_ERROR"
resp.failed_items[0].error_message #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :product_id (required, String) —

    The identifier of the product to associate the Managed APIs with.

  • :managed_api_ids (required, Array<String>) —

    Bounded list of Managed API IDs, used as the request payload for batch associate/disassociate.

Returns:

See Also:



520
521
522
523
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 520

def associate_managed_apis(params = {}, options = {})
  req = build_request(:associate_managed_apis, params)
  req.send_request(options)
end

#create_managed_api(params = {}) ⇒ Types::CreateManagedApiResponse

Promote a discovered API in the API inventory into the managed API list.

Examples:

Request syntax with placeholder values


resp = client.create_managed_api({
  api_signature: { # required
    resource_arn: "ResourceArn", # required
    method: "GET", # required, accepts GET, POST, PUT, DELETE, PATCH, ANY, HEAD, OPTIONS
    hostname: "ApiSignatureHostnameString", # required
    port: 1, # required
    path: "ApiSignaturePathString", # required
  },
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.managed_api_id #=> String
resp.managed_api_arn #=> String
resp.api_signature.resource_arn #=> String
resp.api_signature.method #=> String, one of "GET", "POST", "PUT", "DELETE", "PATCH", "ANY", "HEAD", "OPTIONS"
resp.api_signature.hostname #=> String
resp.api_signature.port #=> Integer
resp.api_signature.path #=> String
resp.created_at #=> Time
resp.updated_at #=> Time
resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :api_signature (required, Types::ApiSignature) —

    The resource, method, host, port, and path that identify the API.

  • :tags (Hash<String,String>) —

    Up to 50 tags per request, matching API Gateway's limit of 50 tags per resource.

Returns:

See Also:



577
578
579
580
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 577

def create_managed_api(params = {}, options = {})
  req = build_request(:create_managed_api, params)
  req.send_request(options)
end

#create_portal(params = {}) ⇒ Types::CreatePortalResponse

Creates a portal that publishes documentation for the products it includes. Use UpdatePortalPublishStatus to publish it.

Examples:

Request syntax with placeholder values


resp = client.create_portal({
  portal_content: { # required
    display_name: "PortalName", # required
    description: "PortalDescription",
    theme: { # required
      custom_colors: { # required
        background_color: "Color", # required
        navigation_color: "Color", # required
        header_color: "Color", # required
        text_color: "Color", # required
        accent_color: "Color", # required
        error_validation_color: "Color", # required
      },
      logo_uploaded_at: Time.now,
    },
  },
  endpoint_configuration: { # required
    none: {
    },
    acm_managed: {
      domain_name: "PortalDomainName", # required
      certificate_arn: "CertificateArn", # required
    },
  },
  authorization: { # required
    authorization_config: { # required
      none: {
      },
      cognito_config: {
        user_pool_arn: "UserPoolArn", # required
        app_client_id: "AppClientId", # required
        user_pool_domain: "UserPoolDomain", # required
        identity_pool_id: "IdentityPoolId",
      },
    },
    fine_grained_access_control: "ENABLED", # required, accepts ENABLED, DISABLED
  },
  included_product_arns: ["ProductArn"],
  logo_uri: "LogoUri",
  rum_app_monitor_name: "RUMAppMonitorName",
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.portal_id #=> String
resp.portal_arn #=> String
resp.endpoint_configuration.domain_name #=> String
resp.endpoint_configuration.certificate_arn #=> String
resp.endpoint_configuration.portal_domain_hosted_zone_id #=> String
resp.endpoint_configuration.portal_default_domain_name #=> String
resp.authorization.authorization_config.cognito_config.user_pool_arn #=> String
resp.authorization.authorization_config.cognito_config.app_client_id #=> String
resp.authorization.authorization_config.cognito_config.user_pool_domain #=> String
resp.authorization.authorization_config.cognito_config.identity_pool_id #=> String
resp.authorization.fine_grained_access_control #=> String, one of "ENABLED", "DISABLED"
resp.portal_content.display_name #=> String
resp.portal_content.description #=> String
resp.portal_content.theme.custom_colors.background_color #=> String
resp.portal_content.theme.custom_colors.navigation_color #=> String
resp.portal_content.theme.custom_colors.header_color #=> String
resp.portal_content.theme.custom_colors.text_color #=> String
resp.portal_content.theme.custom_colors.accent_color #=> String
resp.portal_content.theme.custom_colors.error_validation_color #=> String
resp.portal_content.theme.logo_uploaded_at #=> Time
resp.included_product_arns #=> Array
resp.included_product_arns[0] #=> String
resp.publish_status #=> String, one of "PUBLISHED", "PUBLISH_IN_PROGRESS", "PUBLISH_FAILED", "DISABLE_IN_PROGRESS", "DISABLE_FAILED", "DISABLED"
resp.status_exception.exception #=> String, one of "INTERNAL_FAILURE", "UNSHARED_PRODUCT_EXCEPTION", "CLOUDFRONT_DOMAIN_IN_USE", "MISSING_CLOUDFRONT_PERMISSIONS"
resp.status_exception.message #=> String
resp.updated_at #=> Time
resp.published_at #=> Time
resp.publish_description #=> String
resp.rum_app_monitor_name #=> String
resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :portal_content (required, Types::PortalContent) —

    The portal's display name, description, and theme.

  • :endpoint_configuration (required, Types::EndpointConfigurationRequest) —

    Exactly one of the members is set: none for no custom domain, or acmManaged to bring a domain + ACM certificate. Modeled as a union so the "exactly one" choice is enforced by type.

  • :authorization (required, Types::Authorization) —

    How readers sign in to the portal, and whether fine-grained access control is on.

  • :included_product_arns (Array<String>) —

    The ARNs of the products the portal includes, up to 200.

  • :logo_uri (String) —

    The S3 location of the portal logo, in the form s3://bucket/key.

  • :rum_app_monitor_name (String) —

    The name of the CloudWatch RUM app monitor that collects reader telemetry for the portal.

  • :tags (Hash<String,String>) —

    Up to 50 tags per request, matching API Gateway's limit of 50 tags per resource.

Returns:

See Also:



712
713
714
715
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 712

def create_portal(params = {}, options = {})
  req = build_request(:create_portal, params)
  req.send_request(options)
end

#create_portal_preview(params = {}) ⇒ Struct

Starts building a preview of the portal's current content. Use GetPortal to check the preview status and get the preview URL.

Examples:

Request syntax with placeholder values


resp = client.create_portal_preview({
  portal_id: "PortalId", # required
})

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :portal_id (required, String) —

    The identifier of the portal.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



735
736
737
738
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 735

def create_portal_preview(params = {}, options = {})
  req = build_request(:create_portal_preview, params)
  req.send_request(options)
end

#create_product(params = {}) ⇒ Types::CreateProductResponse

Creates a product. A product groups Managed APIs with their API pages and product pages so a portal can publish them together.

Examples:

Request syntax with placeholder values


resp = client.create_product({
  display_name: "ProductName", # required
  description: "ProductDescription",
  tags: {
    "TagKey" => "TagValue",
  },
  api_selection_configuration: {
    api_selection_mode: "CUSTOM", # required, accepts CUSTOM, RULE_BASED
    rule_filters: [
      {
        key: "RESOURCE_ARN", # required, accepts RESOURCE_ARN, HOST, METHOD, PATH, PORT, ACCOUNT
        values: ["RuleFilterValue"], # required
      },
    ],
  },
})

Response structure


resp.product_id #=> String
resp.product_arn #=> String
resp.display_name #=> String
resp.display_order.overview_page_arn #=> String
resp.display_order.product_page_arns #=> Array
resp.display_order.product_page_arns[0] #=> String
resp.display_order.contents #=> Array
resp.display_order.contents[0].section_name #=> String
resp.display_order.contents[0].product_api_page_arns #=> Array
resp.display_order.contents[0].product_api_page_arns[0] #=> String
resp.description #=> String
resp.updated_at #=> Time
resp.tags #=> Hash
resp.tags["TagKey"] #=> String
resp.api_selection_configuration.api_selection_mode #=> String, one of "CUSTOM", "RULE_BASED"
resp.api_selection_configuration.rule_filters #=> Array
resp.api_selection_configuration.rule_filters[0].key #=> String, one of "RESOURCE_ARN", "HOST", "METHOD", "PATH", "PORT", "ACCOUNT"
resp.api_selection_configuration.rule_filters[0].values #=> Array
resp.api_selection_configuration.rule_filters[0].values[0] #=> String
resp.status #=> String, one of "ACTIVE", "IN_PROGRESS", "FAILED"
resp.failure_reason #=> String, one of "API_PAGE_ATTACHED", "EVALUATION_ERROR"

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :display_name (required, String) —

    The name of the product, from 1 to 255 characters.

  • :description (String) —

    A description of the product, up to 1024 characters.

  • :tags (Hash<String,String>) —

    Up to 50 tags per request, matching API Gateway's limit of 50 tags per resource.

  • :api_selection_configuration (Types::ApiSelectionConfiguration) —

    How Managed APIs are selected for the product. The selection mode can't be changed after the product is created.

Returns:

See Also:



817
818
819
820
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 817

def create_product(params = {}, options = {})
  req = build_request(:create_product, params)
  req.send_request(options)
end

#create_product_api_page(params = {}) ⇒ Types::CreateProductApiPageResponse

Creates an API page that documents a Managed API in a product. The page content is generated asynchronously. Use status to track it.

Examples:

Request syntax with placeholder values


resp = client.create_product_api_page({
  product_id: "ProductId", # required
  managed_api_id: "ManagedApiId", # required
  display_content: {
    none: {
    },
    overrides: {
      operation_name: "OperationName",
      api_url: "DisplayContentOverridesApiUrlString",
      body: "ApiPageBody",
    },
  },
  try_it_state: "ENABLED", # accepts ENABLED, DISABLED
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.product_api_page_id #=> String
resp.product_api_page_arn #=> String
resp.api_id.identifier_parts.path #=> String
resp.api_id.identifier_parts.method #=> String
resp.api_id.identifier_parts.resource_arn #=> String
resp.display_content.operation_name #=> String
resp.display_content.api_url #=> String
resp.display_content.body #=> String
resp.try_it_state #=> String, one of "ENABLED", "DISABLED"
resp.updated_at #=> Time
resp.status #=> String, one of "AVAILABLE", "IN_PROGRESS", "FAILED"
resp.status_exception.exception #=> String, one of "INTERNAL_FAILURE", "RESOURCE_DELETED", "MEMBER_LEFT_ORG"
resp.status_exception.message #=> String
resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :product_id (required, String) —

    The identifier of the product.

  • :managed_api_id (required, String) —

    The Managed API this page documents. It must already be associated with the product, and the page's API identifier is taken from the Managed API rather than supplied by the caller.

  • :display_content (Types::ApiPageDisplayContent) —

    Exactly one of the members is set: none to use default display content, or overrides to customize it. Modeled as a union so the "exactly one" choice is enforced by type.

  • :try_it_state (String) —

    Whether readers can call the API from the page with Try-It. Defaults to DISABLED. To enable it, the page's API URL must use HTTPS on a domain that supports Try-It.

  • :tags (Hash<String,String>) —

    Up to 50 tags per request, matching API Gateway's limit of 50 tags per resource.

Returns:

See Also:



901
902
903
904
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 901

def create_product_api_page(params = {}, options = {})
  req = build_request(:create_product_api_page, params)
  req.send_request(options)
end

#create_product_page(params = {}) ⇒ Types::CreateProductPageResponse

Creates a product page with free-form documentation. A product can have up to 40 pages.

Examples:

Request syntax with placeholder values


resp = client.create_product_page({
  product_id: "ProductId", # required
  display_content: { # required
    title: "PageTitle", # required
    body: "PageBody", # required
  },
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.product_page_id #=> String
resp.product_page_arn #=> String
resp.display_content.title #=> String
resp.display_content.body #=> String
resp.updated_at #=> Time
resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :product_id (required, String) —

    The identifier of the product.

  • :display_content (required, Types::DisplayContent) —

    The title and body of the page.

  • :tags (Hash<String,String>) —

    Up to 50 tags per request, matching API Gateway's limit of 50 tags per resource.

Returns:

See Also:



954
955
956
957
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 954

def create_product_page(params = {}, options = {})
  req = build_request(:create_product_page, params)
  req.send_request(options)
end

#delete_discovery_configuration(params = {}) ⇒ Struct

Deletes the discovery configuration and stops any running discovery.

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



967
968
969
970
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 967

def delete_discovery_configuration(params = {}, options = {})
  req = build_request(:delete_discovery_configuration, params)
  req.send_request(options)
end

#delete_managed_api(params = {}) ⇒ Struct

Deletes a Managed API.

Examples:

Request syntax with placeholder values


resp = client.delete_managed_api({
  managed_api_id: "ManagedApiId", # required
})

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :managed_api_id (required, String) —

    The identifier of the Managed API.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



989
990
991
992
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 989

def delete_managed_api(params = {}, options = {})
  req = build_request(:delete_managed_api, params)
  req.send_request(options)
end

#delete_organization_discovery_configuration(params = {}) ⇒ Struct

Deletes the organization-wide discovery configuration and stops any running discovery across the organization. Only the organization management account may call this operation.

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



1004
1005
1006
1007
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 1004

def delete_organization_discovery_configuration(params = {}, options = {})
  req = build_request(:delete_organization_discovery_configuration, params)
  req.send_request(options)
end

#delete_portal(params = {}) ⇒ Struct

Deletes a portal.

Examples:

Request syntax with placeholder values


resp = client.delete_portal({
  portal_id: "PortalId", # required
})

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :portal_id (required, String) —

    The identifier of the portal.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



1026
1027
1028
1029
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 1026

def delete_portal(params = {}, options = {})
  req = build_request(:delete_portal, params)
  req.send_request(options)
end

#delete_product(params = {}) ⇒ Struct

Deletes a product.

Examples:

Request syntax with placeholder values


resp = client.delete_product({
  product_id: "ProductId", # required
})

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :product_id (required, String) —

    The identifier of the product.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



1048
1049
1050
1051
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 1048

def delete_product(params = {}, options = {})
  req = build_request(:delete_product, params)
  req.send_request(options)
end

#delete_product_api_page(params = {}) ⇒ Struct

Deletes an API page.

Examples:

Request syntax with placeholder values


resp = client.delete_product_api_page({
  product_id: "ProductId", # required
  product_api_page_id: "ProductApiPageId", # required
})

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :product_id (required, String) —

    The identifier of the product.

  • :product_api_page_id (required, String) —

    The identifier of the API page.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



1074
1075
1076
1077
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 1074

def delete_product_api_page(params = {}, options = {})
  req = build_request(:delete_product_api_page, params)
  req.send_request(options)
end

#delete_product_page(params = {}) ⇒ Struct

Deletes a product page.

Examples:

Request syntax with placeholder values


resp = client.delete_product_page({
  product_id: "ProductId", # required
  product_page_id: "ProductPageId", # required
})

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :product_id (required, String) —

    The identifier of the product.

  • :product_page_id (required, String) —

    The identifier of the product page.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



1100
1101
1102
1103
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 1100

def delete_product_page(params = {}, options = {})
  req = build_request(:delete_product_page, params)
  req.send_request(options)
end

#delete_product_sharing_policy(params = {}) ⇒ Struct

Deletes the sharing policy of a product. The product is no longer shared.

Examples:

Request syntax with placeholder values


resp = client.delete_product_sharing_policy({
  product_id: "ProductId", # required
})

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :product_id (required, String) —

    The identifier of the product.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



1123
1124
1125
1126
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 1123

def delete_product_sharing_policy(params = {}, options = {})
  req = build_request(:delete_product_sharing_policy, params)
  req.send_request(options)
end

#disassociate_managed_apis(params = {}) ⇒ Types::DisassociateManagedApisResponse

Disassociate one or more Managed APIs from a product. Best-effort — IDs that fail are returned in DisassociateManagedApisResponse#failedItems; IDs that succeed are omitted. Disassociating an unmapped Managed API is a no-op (not reported as failure).

Examples:

Request syntax with placeholder values


resp = client.disassociate_managed_apis({
  product_id: "ProductId", # required
  managed_api_ids: ["ManagedApiId"], # required
})

Response structure


resp.failed_items #=> Array
resp.failed_items[0].managed_api_id #=> String
resp.failed_items[0].error_code #=> String, one of "MANAGED_API_NOT_FOUND", "INTERNAL_ERROR"
resp.failed_items[0].error_message #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :product_id (required, String) —

    The identifier of the product to disassociate the Managed APIs from.

  • :managed_api_ids (required, Array<String>) —

    Bounded list of Managed API IDs, used as the request payload for batch associate/disassociate.

Returns:

See Also:



1163
1164
1165
1166
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 1163

def disassociate_managed_apis(params = {}, options = {})
  req = build_request(:disassociate_managed_apis, params)
  req.send_request(options)
end

#get_api_inventory_item(params = {}) ⇒ Types::GetApiInventoryItemResponse

Gets full details of a single API inventory item.

Examples:

Request syntax with placeholder values


resp = client.get_api_inventory_item({
  method: "GET", # required, accepts GET, POST, PUT, DELETE, PATCH, ANY, HEAD, OPTIONS
  host: "Host", # required
  port: 1, # required
  path: "Path", # required
  resource_arn: "ResourceArn", # required
})

Response structure


resp.item.method #=> String, one of "GET", "POST", "PUT", "DELETE", "PATCH", "ANY", "HEAD", "OPTIONS"
resp.item.host #=> String
resp.item.port #=> Integer
resp.item.path #=> String
resp.item. #=> String
resp.item.resource_arn #=> String
resp.item.region #=> String
resp.item.discovery_source #=> String, one of "API_GATEWAY", "ELB", "CLOUDFRONT"
resp.item.visibility #=> String, one of "PUBLIC", "PRIVATE"
resp.item.waf_status #=> String, one of "ENABLED", "DISABLED"
resp.item.classification #=> String, one of "SHADOW", "MANAGED", "MANAGED_ZOMBIE", "MANAGED_ORPHANED"
resp.item.managed_by #=> String, one of "SELF", "ORGANIZATION"
resp.item.workloads #=> Array
resp.item.workloads[0] #=> String, one of "MCP", "LLM", "A2A"
resp.item.managed_api_id #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :method (required, String) —

    The HTTP method of the API.

  • :host (required, String) —

    A discovered API's front-door hostname (e.g. an ALB, CloudFront, or API Gateway DNS name), bounded by the DNS name limit (RFC 1035). Usually literal, but may contain placeholders: <> - stands for one dot-separated part of the hostname. When 10 or more hosts differ only in that part, they fold into one, e.g. a.example.com, b.example.com, ... become "<>.example.com". Deeper levels fold the same way ("<>.<>.example.com"). The registrable domain never folds. - an IP-literal host.

  • :port (required, Integer) —

    The port the API listens on, from 0 to 65535.

  • :path (required, String) —

    The request path of the API.

  • :resource_arn (required, String) —

    The ARN of the resource that serves the API, such as an API Gateway stage or a load balancer.

Returns:

See Also:



1229
1230
1231
1232
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 1229

def get_api_inventory_item(params = {}, options = {})
  req = build_request(:get_api_inventory_item, params)
  req.send_request(options)
end

#get_discovery_configuration(params = {}) ⇒ Types::GetDiscoveryConfigurationResponse

Retrieves the discovery configuration for the account and region.

Examples:

Response structure


resp.discovery_configuration.arn #=> String
resp.discovery_configuration.status #=> String, one of "DISABLED", "ENABLED", "UPDATING"
resp.discovery_configuration.discovery_sources #=> Array
resp.discovery_configuration.discovery_sources[0] #=> String, one of "API_GATEWAY", "ELB", "CLOUDFRONT"
resp.discovery_configuration.excluded_resources #=> Array
resp.discovery_configuration.excluded_resources[0] #=> String
resp.discovery_configuration.features #=> Array
resp.discovery_configuration.features[0] #=> String, one of "AI_DISCOVERY"
resp.discovery_configuration.created_at #=> Time
resp.discovery_configuration.updated_at #=> Time
resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Returns:

See Also:



1260
1261
1262
1263
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 1260

def get_discovery_configuration(params = {}, options = {})
  req = build_request(:get_discovery_configuration, params)
  req.send_request(options)
end

#get_managed_api(params = {}) ⇒ Types::GetManagedApiResponse

Returns a Managed API, including its security posture findings.

Examples:

Request syntax with placeholder values


resp = client.get_managed_api({
  managed_api_id: "ManagedApiId", # required
})

Response structure


resp.managed_api_id #=> String
resp.managed_api_arn #=> String
resp.api_signature.resource_arn #=> String
resp.api_signature.method #=> String, one of "GET", "POST", "PUT", "DELETE", "PATCH", "ANY", "HEAD", "OPTIONS"
resp.api_signature.hostname #=> String
resp.api_signature.port #=> Integer
resp.api_signature.path #=> String
resp.created_at #=> Time
resp.updated_at #=> Time
resp.findings #=> Array
resp.findings[0].posture_id #=> String
resp.findings[0].posture_status #=> String, one of "TRUE", "FALSE", "NOT_APPLICABLE", "INSUFFICIENT_DATA"
resp.findings[0].reason #=> String, one of "AUTHENTICATION_NOT_CONFIGURED", "REQUEST_VALIDATION_NOT_ENABLED", "API_KEY_NOT_CONFIGURED", "THROTTLING_NOT_ENABLED", "THROTTLING_RATE_LIMIT_NOT_SET", "THROTTLING_BURST_LIMIT_NOT_SET", "RESPONSE_CACHING_NOT_ENABLED", "STAGE_WAF_NOT_ASSOCIATED", "STAGE_ACCESS_LOGGING_NOT_ENABLED", "PRIVATE_API_RESOURCE_POLICY_MISSING", "REST_API_TLS_BELOW_1_2", "LOAD_BALANCER_WAF_NOT_ASSOCIATED", "LISTENER_TLS_BELOW_1_2", "DISTRIBUTION_TLS_BELOW_1_2", "DISTRIBUTION_WAF_NOT_ASSOCIATED", "DISTRIBUTION_SERVES_PLAINTEXT_HTTP", "DISTRIBUTION_ACCESS_LOGGING_NOT_ENABLED", "GEO_RESTRICTION_NOT_CONFIGURED", "UNKNOWN"
resp.findings[0].updated_at #=> Time
resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :managed_api_id (required, String) —

    The identifier of the Managed API.

Returns:

See Also:



1309
1310
1311
1312
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 1309

def get_managed_api(params = {}, options = {})
  req = build_request(:get_managed_api, params)
  req.send_request(options)
end

#get_organization_discovery_configuration(params = {}) ⇒ Types::GetOrganizationDiscoveryConfigurationResponse

Retrieves the organization-wide discovery configuration. Only the organization management account and registered delegated administrators may call this operation.

Examples:

Response structure


resp.discovery_configuration.arn #=> String
resp.discovery_configuration.status #=> String, one of "DISABLED", "ENABLED", "UPDATING"
resp.discovery_configuration.discovery_sources #=> Array
resp.discovery_configuration.discovery_sources[0] #=> String, one of "API_GATEWAY", "ELB", "CLOUDFRONT"
resp.discovery_configuration.exclusion_filters.organizational_unit_ids #=> Array
resp.discovery_configuration.exclusion_filters.organizational_unit_ids[0] #=> String
resp.discovery_configuration.exclusion_filters. #=> Array
resp.discovery_configuration.exclusion_filters.[0] #=> String
resp.discovery_configuration.exclusion_filters.resource_arns #=> Array
resp.discovery_configuration.exclusion_filters.resource_arns[0] #=> String
resp.discovery_configuration.discovery_filters.exclusion_filters.organizational_unit_ids #=> Array
resp.discovery_configuration.discovery_filters.exclusion_filters.organizational_unit_ids[0] #=> String
resp.discovery_configuration.discovery_filters.exclusion_filters. #=> Array
resp.discovery_configuration.discovery_filters.exclusion_filters.[0] #=> String
resp.discovery_configuration.discovery_filters.exclusion_filters.resource_arns #=> Array
resp.discovery_configuration.discovery_filters.exclusion_filters.resource_arns[0] #=> String
resp.discovery_configuration.discovery_filters.inclusion_filters.organizational_unit_ids #=> Array
resp.discovery_configuration.discovery_filters.inclusion_filters.organizational_unit_ids[0] #=> String
resp.discovery_configuration.discovery_filters.inclusion_filters. #=> Array
resp.discovery_configuration.discovery_filters.inclusion_filters.[0] #=> String
resp.discovery_configuration.features #=> Array
resp.discovery_configuration.features[0] #=> String, one of "AI_DISCOVERY"
resp.discovery_configuration.created_at #=> Time
resp.discovery_configuration.updated_at #=> Time
resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Returns:

See Also:



1356
1357
1358
1359
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 1356

def get_organization_discovery_configuration(params = {}, options = {})
  req = build_request(:get_organization_discovery_configuration, params)
  req.send_request(options)
end

#get_portal(params = {}) ⇒ Types::GetPortalResponse

Returns the configuration, publish status, and preview status of a portal.

Examples:

Request syntax with placeholder values


resp = client.get_portal({
  portal_id: "PortalId", # required
})

Response structure


resp.portal_id #=> String
resp.portal_arn #=> String
resp.endpoint_configuration.domain_name #=> String
resp.endpoint_configuration.certificate_arn #=> String
resp.endpoint_configuration.portal_domain_hosted_zone_id #=> String
resp.endpoint_configuration.portal_default_domain_name #=> String
resp.authorization.authorization_config.cognito_config.user_pool_arn #=> String
resp.authorization.authorization_config.cognito_config.app_client_id #=> String
resp.authorization.authorization_config.cognito_config.user_pool_domain #=> String
resp.authorization.authorization_config.cognito_config.identity_pool_id #=> String
resp.authorization.fine_grained_access_control #=> String, one of "ENABLED", "DISABLED"
resp.portal_content.display_name #=> String
resp.portal_content.description #=> String
resp.portal_content.theme.custom_colors.background_color #=> String
resp.portal_content.theme.custom_colors.navigation_color #=> String
resp.portal_content.theme.custom_colors.header_color #=> String
resp.portal_content.theme.custom_colors.text_color #=> String
resp.portal_content.theme.custom_colors.accent_color #=> String
resp.portal_content.theme.custom_colors.error_validation_color #=> String
resp.portal_content.theme.logo_uploaded_at #=> Time
resp.included_product_arns #=> Array
resp.included_product_arns[0] #=> String
resp.publish_status #=> String, one of "PUBLISHED", "PUBLISH_IN_PROGRESS", "PUBLISH_FAILED", "DISABLE_IN_PROGRESS", "DISABLE_FAILED", "DISABLED"
resp.status_exception.exception #=> String, one of "INTERNAL_FAILURE", "UNSHARED_PRODUCT_EXCEPTION", "CLOUDFRONT_DOMAIN_IN_USE", "MISSING_CLOUDFRONT_PERMISSIONS"
resp.status_exception.message #=> String
resp.updated_at #=> Time
resp.published_at #=> Time
resp.publish_description #=> String
resp.rum_app_monitor_name #=> String
resp.preview.preview_status #=> String, one of "PREVIEW_IN_PROGRESS", "PREVIEW_FAILED", "PREVIEW_READY"
resp.preview.status_exception.exception #=> String, one of "INTERNAL_FAILURE", "UNSHARED_PRODUCT_EXCEPTION", "CLOUDFRONT_DOMAIN_IN_USE", "MISSING_CLOUDFRONT_PERMISSIONS"
resp.preview.status_exception.message #=> String
resp.preview.preview_url #=> String
resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :portal_id (required, String) —

    The identifier of the portal.

Returns:

See Also:



1432
1433
1434
1435
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 1432

def get_portal(params = {}, options = {})
  req = build_request(:get_portal, params)
  req.send_request(options)
end

#get_product(params = {}) ⇒ Types::GetProductResponse

Returns a product. To read a product shared with you by another account, supply resourceOwnerAccountId.

Examples:

Request syntax with placeholder values


resp = client.get_product({
  product_id: "ProductId", # required
  resource_owner_account_id: "AccountId",
})

Response structure


resp.product_id #=> String
resp.product_arn #=> String
resp.display_name #=> String
resp.display_order.overview_page_arn #=> String
resp.display_order.product_page_arns #=> Array
resp.display_order.product_page_arns[0] #=> String
resp.display_order.contents #=> Array
resp.display_order.contents[0].section_name #=> String
resp.display_order.contents[0].product_api_page_arns #=> Array
resp.display_order.contents[0].product_api_page_arns[0] #=> String
resp.description #=> String
resp.updated_at #=> Time
resp.tags #=> Hash
resp.tags["TagKey"] #=> String
resp.api_selection_configuration.api_selection_mode #=> String, one of "CUSTOM", "RULE_BASED"
resp.api_selection_configuration.rule_filters #=> Array
resp.api_selection_configuration.rule_filters[0].key #=> String, one of "RESOURCE_ARN", "HOST", "METHOD", "PATH", "PORT", "ACCOUNT"
resp.api_selection_configuration.rule_filters[0].values #=> Array
resp.api_selection_configuration.rule_filters[0].values[0] #=> String
resp.status #=> String, one of "ACTIVE", "IN_PROGRESS", "FAILED"
resp.failure_reason #=> String, one of "API_PAGE_ATTACHED", "EVALUATION_ERROR"

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :product_id (required, String) —

    The identifier of the product.

  • :resource_owner_account_id (String) —

    The AWS account ID that owns the product. Supply it to read a product shared with you by another account. Omit it for products in your own account.

Returns:

See Also:



1496
1497
1498
1499
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 1496

def get_product(params = {}, options = {})
  req = build_request(:get_product, params)
  req.send_request(options)
end

#get_product_api_page(params = {}) ⇒ Types::GetProductApiPageResponse

Returns an API page, including its body.

Examples:

Request syntax with placeholder values


resp = client.get_product_api_page({
  product_id: "ProductId", # required
  product_api_page_id: "ProductApiPageId", # required
  resource_owner_account_id: "AccountId",
  include_raw_display_content: false,
})

Response structure


resp.product_api_page_id #=> String
resp.product_api_page_arn #=> String
resp.api_id.identifier_parts.path #=> String
resp.api_id.identifier_parts.method #=> String
resp.api_id.identifier_parts.resource_arn #=> String
resp.display_content.operation_name #=> String
resp.display_content.api_url #=> String
resp.display_content.body #=> String
resp.try_it_state #=> String, one of "ENABLED", "DISABLED"
resp.updated_at #=> Time
resp.status #=> String, one of "AVAILABLE", "IN_PROGRESS", "FAILED"
resp.raw_display_content #=> String
resp.status_exception.exception #=> String, one of "INTERNAL_FAILURE", "RESOURCE_DELETED", "MEMBER_LEFT_ORG"
resp.status_exception.message #=> String
resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :product_id (required, String) —

    The identifier of the product.

  • :product_api_page_id (required, String) —

    The identifier of the API page.

  • :resource_owner_account_id (String) —

    The AWS account ID that owns the product. Supply it to read a product shared with you by another account. Omit it for products in your own account.

  • :include_raw_display_content (Boolean) —

    Set to true to also return the page body in rawDisplayContent.

Returns:

See Also:



1562
1563
1564
1565
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 1562

def get_product_api_page(params = {}, options = {})
  req = build_request(:get_product_api_page, params)
  req.send_request(options)
end

#get_product_page(params = {}) ⇒ Types::GetProductPageResponse

Returns a product page, including its body.

Examples:

Request syntax with placeholder values


resp = client.get_product_page({
  product_id: "ProductId", # required
  product_page_id: "ProductPageId", # required
  resource_owner_account_id: "AccountId",
})

Response structure


resp.product_page_id #=> String
resp.product_page_arn #=> String
resp.display_content.title #=> String
resp.display_content.body #=> String
resp.updated_at #=> Time
resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :product_id (required, String) —

    The identifier of the product.

  • :product_page_id (required, String) —

    The identifier of the product page.

  • :resource_owner_account_id (String) —

    The AWS account ID that owns the product. Supply it to read a product shared with you by another account. Omit it for products in your own account.

Returns:

See Also:



1610
1611
1612
1613
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 1610

def get_product_page(params = {}, options = {})
  req = build_request(:get_product_page, params)
  req.send_request(options)
end

#get_product_sharing_policy(params = {}) ⇒ Types::GetProductSharingPolicyResponse

Returns the sharing policy of a product.

Examples:

Request syntax with placeholder values


resp = client.get_product_sharing_policy({
  product_id: "ProductId", # required
})

Response structure


resp.product_id #=> String
resp.policy_document #=> String
resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :product_id (required, String) —

    The identifier of the product.

Returns:

See Also:



1643
1644
1645
1646
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 1643

def get_product_sharing_policy(params = {}, options = {})
  req = build_request(:get_product_sharing_policy, params)
  req.send_request(options)
end

#list_api_inventory_items(params = {}) ⇒ Types::ListApiInventoryItemsResponse

Lists discovered API inventory items with filtering and pagination.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_api_inventory_items({
  filters: {
    discovery_source: "API_GATEWAY", # accepts API_GATEWAY, ELB, CLOUDFRONT
    resource_arn: "ResourceArn",
  },
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.items #=> Array
resp.items[0].method #=> String, one of "GET", "POST", "PUT", "DELETE", "PATCH", "ANY", "HEAD", "OPTIONS"
resp.items[0].host #=> String
resp.items[0].port #=> Integer
resp.items[0].path #=> String
resp.items[0]. #=> String
resp.items[0].resource_arn #=> String
resp.items[0].region #=> String
resp.items[0].discovery_source #=> String, one of "API_GATEWAY", "ELB", "CLOUDFRONT"
resp.items[0].first_seen #=> Time
resp.items[0].last_seen #=> Time
resp.items[0].visibility #=> String, one of "PUBLIC", "PRIVATE"
resp.items[0].waf_status #=> String, one of "ENABLED", "DISABLED"
resp.items[0].classification #=> String, one of "SHADOW", "MANAGED", "MANAGED_ZOMBIE", "MANAGED_ORPHANED"
resp.items[0].managed_by #=> String, one of "SELF", "ORGANIZATION"
resp.items[0].workloads #=> Array
resp.items[0].workloads[0] #=> String, one of "MCP", "LLM", "A2A"
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :filters (Types::ApiInventoryFilters) —

    Filters that limit the results. Omit it to list every discovered API.

  • :max_results (Integer) —

    The maximum number of results to return in one page, from 1 to 100.

  • :next_token (String) —

    The pagination token returned by a previous call. Omit it to get the first page.

Returns:

See Also:



1703
1704
1705
1706
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 1703

def list_api_inventory_items(params = {}, options = {})
  req = build_request(:list_api_inventory_items, params)
  req.send_request(options)
end

#list_discovery_statuses(params = {}) ⇒ Types::ListDiscoveryStatusesResponse

Lists discovery statuses for services.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_discovery_statuses({
  discovery_source: "API_GATEWAY", # accepts API_GATEWAY, ELB, CLOUDFRONT
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.items #=> Array
resp.items[0]. #=> String
resp.items[0].discovery_source #=> String, one of "API_GATEWAY", "ELB", "CLOUDFRONT"
resp.items[0].status #=> String, one of "STOPPED", "PROVISIONING", "RUNNING", "FAILED"
resp.items[0].failure_reason #=> String, one of "ACCESS_DENIED", "DEPENDENCY_ERROR", "THROTTLED", "INVALID_CONFIGURATION", "INTERNAL_ERROR"
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :discovery_source (String) —

    The AWS service that is the SOURCE of discovered APIs — i.e. the front-door service type whose resources discovery crawls to find APIs. New source services may be added over time, so clients MUST treat any unrecognized value gracefully.

  • :max_results (Integer) —

    The maximum number of results to return in one page, from 1 to 100.

  • :next_token (String) —

    The pagination token returned by a previous call. Omit it to get the first page.

Returns:

See Also:



1751
1752
1753
1754
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 1751

def list_discovery_statuses(params = {}, options = {})
  req = build_request(:list_discovery_statuses, params)
  req.send_request(options)
end

#list_managed_api_events(params = {}) ⇒ Types::ListManagedApiEventsResponse

Lists API-security events for a single managed API, most recent first. Returns up to 20 of the most recent events (not paginated).

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_managed_api_events({
  managed_api_id: "ManagedApiId", # required
  started_after: Time.now,
  started_before: Time.now,
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.items #=> Array
resp.items[0].event_id #=> String
resp.items[0].event_type #=> String, one of "WAF_API_SECURITY"
resp.items[0].status #=> String, one of "EVENT_STARTED", "EVENT_IN_PROGRESS", "EVENT_ENDED"
resp.items[0].waf_api_security_event_detail.label #=> String
resp.items[0].waf_api_security_event_detail.category #=> String
resp.items[0].waf_api_security_event_detail.confidence #=> String, one of "LOW", "MEDIUM", "HIGH"
resp.items[0].waf_api_security_event_detail.web_acl_arn #=> String
resp.items[0].started_at #=> Time
resp.items[0].ended_at #=> Time
resp.items[0].updated_at #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :managed_api_id (required, String) —

    The identifier of the Managed API.

  • :started_after (Time, DateTime, Date, Integer, String) —

    Inclusive lower bound on each event's start time; only events that started at or after this time are returned. Optional; defaults to 30 days before the current time.

  • :started_before (Time, DateTime, Date, Integer, String) —

    Exclusive upper bound on each event's start time; only events that started before this time are returned. Optional; defaults to the current time.

  • :max_results (Integer) —

    The maximum number of results to return in one page, from 1 to 20.

  • :next_token (String) —

    The pagination token returned by a previous call. Omit it to get the first page.

Returns:

See Also:



1815
1816
1817
1818
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 1815

def list_managed_api_events(params = {}, options = {})
  req = build_request(:list_managed_api_events, params)
  req.send_request(options)
end

#list_managed_apis(params = {}) ⇒ Types::ListManagedApisResponse

Lists the Managed APIs in your account.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_managed_apis({
  max_results: 1,
  next_token: "NextToken",
  product_id: "ProductId",
})

Response structure


resp.next_token #=> String
resp.items #=> Array
resp.items[0].managed_api_id #=> String
resp.items[0].managed_api_arn #=> String
resp.items[0].api_signature.resource_arn #=> String
resp.items[0].api_signature.method #=> String, one of "GET", "POST", "PUT", "DELETE", "PATCH", "ANY", "HEAD", "OPTIONS"
resp.items[0].api_signature.hostname #=> String
resp.items[0].api_signature.port #=> Integer
resp.items[0].api_signature.path #=> String
resp.items[0].created_at #=> Time
resp.items[0].updated_at #=> Time

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :max_results (Integer) —

    The maximum number of results to return in one page, from 1 to 100.

  • :next_token (String) —

    The pagination token returned by a previous call. Omit it to get the first page.

  • :product_id (String) —

    Optional filter: when supplied, only Managed APIs associated with this product are returned.

Returns:

See Also:



1866
1867
1868
1869
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 1866

def list_managed_apis(params = {}, options = {})
  req = build_request(:list_managed_apis, params)
  req.send_request(options)
end

#list_portals(params = {}) ⇒ Types::ListPortalsResponse

Lists the portals in your account.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_portals({
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.items #=> Array
resp.items[0].portal_id #=> String
resp.items[0].portal_arn #=> String
resp.items[0].endpoint_configuration.domain_name #=> String
resp.items[0].endpoint_configuration.certificate_arn #=> String
resp.items[0].endpoint_configuration.portal_domain_hosted_zone_id #=> String
resp.items[0].endpoint_configuration.portal_default_domain_name #=> String
resp.items[0].authorization.authorization_config.cognito_config.user_pool_arn #=> String
resp.items[0].authorization.authorization_config.cognito_config.app_client_id #=> String
resp.items[0].authorization.authorization_config.cognito_config.user_pool_domain #=> String
resp.items[0].authorization.authorization_config.cognito_config.identity_pool_id #=> String
resp.items[0].authorization.fine_grained_access_control #=> String, one of "ENABLED", "DISABLED"
resp.items[0].portal_content.display_name #=> String
resp.items[0].portal_content.description #=> String
resp.items[0].portal_content.theme.custom_colors.background_color #=> String
resp.items[0].portal_content.theme.custom_colors.navigation_color #=> String
resp.items[0].portal_content.theme.custom_colors.header_color #=> String
resp.items[0].portal_content.theme.custom_colors.text_color #=> String
resp.items[0].portal_content.theme.custom_colors.accent_color #=> String
resp.items[0].portal_content.theme.custom_colors.error_validation_color #=> String
resp.items[0].portal_content.theme.logo_uploaded_at #=> Time
resp.items[0].included_product_arns #=> Array
resp.items[0].included_product_arns[0] #=> String
resp.items[0].publish_status #=> String, one of "PUBLISHED", "PUBLISH_IN_PROGRESS", "PUBLISH_FAILED", "DISABLE_IN_PROGRESS", "DISABLE_FAILED", "DISABLED"
resp.items[0].status_exception.exception #=> String, one of "INTERNAL_FAILURE", "UNSHARED_PRODUCT_EXCEPTION", "CLOUDFRONT_DOMAIN_IN_USE", "MISSING_CLOUDFRONT_PERMISSIONS"
resp.items[0].status_exception.message #=> String
resp.items[0].updated_at #=> Time
resp.items[0].published_at #=> Time
resp.items[0].publish_description #=> String
resp.items[0].rum_app_monitor_name #=> String
resp.items[0].preview.preview_status #=> String, one of "PREVIEW_IN_PROGRESS", "PREVIEW_FAILED", "PREVIEW_READY"
resp.items[0].preview.status_exception.exception #=> String, one of "INTERNAL_FAILURE", "UNSHARED_PRODUCT_EXCEPTION", "CLOUDFRONT_DOMAIN_IN_USE", "MISSING_CLOUDFRONT_PERMISSIONS"
resp.items[0].preview.status_exception.message #=> String
resp.items[0].preview.preview_url #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :max_results (Integer) —

    The maximum number of results to return in one page, from 1 to 100.

  • :next_token (String) —

    The pagination token returned by a previous call. Omit it to get the first page.

Returns:

See Also:



1936
1937
1938
1939
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 1936

def list_portals(params = {}, options = {})
  req = build_request(:list_portals, params)
  req.send_request(options)
end

#list_product_api_pages(params = {}) ⇒ Types::ListProductApiPagesResponse

Lists the API pages in a product. The results do not include page bodies.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_product_api_pages({
  product_id: "ProductId", # required
  next_token: "NextToken",
  max_results: 1,
  resource_owner_account_id: "AccountId",
})

Response structure


resp.next_token #=> String
resp.items #=> Array
resp.items[0].product_api_page_id #=> String
resp.items[0].product_api_page_arn #=> String
resp.items[0].api_id.identifier_parts.path #=> String
resp.items[0].api_id.identifier_parts.method #=> String
resp.items[0].api_id.identifier_parts.resource_arn #=> String
resp.items[0].operation_name #=> String
resp.items[0].api_url #=> String
resp.items[0].try_it_state #=> String, one of "ENABLED", "DISABLED"
resp.items[0].updated_at #=> Time
resp.items[0].status #=> String, one of "AVAILABLE", "IN_PROGRESS", "FAILED"
resp.items[0].status_exception.exception #=> String, one of "INTERNAL_FAILURE", "RESOURCE_DELETED", "MEMBER_LEFT_ORG"
resp.items[0].status_exception.message #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :product_id (required, String) —

    The identifier of the product.

  • :next_token (String) —

    The pagination token returned by a previous call. Omit it to get the first page.

  • :max_results (Integer) —

    The maximum number of results to return in one page, from 1 to 100.

  • :resource_owner_account_id (String) —

    The AWS account ID that owns the product. Supply it to read a product shared with you by another account. Omit it for products in your own account.

Returns:

See Also:



1996
1997
1998
1999
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 1996

def list_product_api_pages(params = {}, options = {})
  req = build_request(:list_product_api_pages, params)
  req.send_request(options)
end

#list_product_pages(params = {}) ⇒ Types::ListProductPagesResponse

Lists the product pages in a product. The results do not include page bodies.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_product_pages({
  product_id: "ProductId", # required
  next_token: "NextToken",
  max_results: 1,
  resource_owner_account_id: "AccountId",
})

Response structure


resp.next_token #=> String
resp.items #=> Array
resp.items[0].product_page_id #=> String
resp.items[0].product_page_arn #=> String
resp.items[0].page_title #=> String
resp.items[0].updated_at #=> Time

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :product_id (required, String) —

    The identifier of the product.

  • :next_token (String) —

    The pagination token returned by a previous call. Omit it to get the first page.

  • :max_results (Integer) —

    The maximum number of results to return in one page, from 1 to 100.

  • :resource_owner_account_id (String) —

    The AWS account ID that owns the product. Supply it to read a product shared with you by another account. Omit it for products in your own account.

Returns:

See Also:



2048
2049
2050
2051
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 2048

def list_product_pages(params = {}, options = {})
  req = build_request(:list_product_pages, params)
  req.send_request(options)
end

#list_products(params = {}) ⇒ Types::ListProductsResponse

Lists products you own, products shared with you, or both.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_products({
  max_results: 1,
  next_token: "NextToken",
  resource_owner: "ALL", # accepts ALL, SELF, OTHER_ACCOUNTS
  managed_api_id: "ManagedApiId",
})

Response structure


resp.next_token #=> String
resp.items #=> Array
resp.items[0].product_id #=> String
resp.items[0].product_arn #=> String
resp.items[0].display_name #=> String
resp.items[0].description #=> String
resp.items[0].updated_at #=> Time
resp.items[0].api_selection_configuration.api_selection_mode #=> String, one of "CUSTOM", "RULE_BASED"
resp.items[0].api_selection_configuration.rule_filters #=> Array
resp.items[0].api_selection_configuration.rule_filters[0].key #=> String, one of "RESOURCE_ARN", "HOST", "METHOD", "PATH", "PORT", "ACCOUNT"
resp.items[0].api_selection_configuration.rule_filters[0].values #=> Array
resp.items[0].api_selection_configuration.rule_filters[0].values[0] #=> String
resp.items[0].status #=> String, one of "ACTIVE", "IN_PROGRESS", "FAILED"
resp.items[0].failure_reason #=> String, one of "API_PAGE_ATTACHED", "EVALUATION_ERROR"

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :max_results (Integer) —

    The maximum number of results to return in one page, from 1 to 100.

  • :next_token (String) —

    The pagination token returned by a previous call. Omit it to get the first page.

  • :resource_owner (String) —

    Whose products to return: SELF for your own, OTHER_ACCOUNTS for products shared with you, or ALL. Defaults to ALL, or to SELF when managedApiId is supplied.

  • :managed_api_id (String) —

    Optional filter: when supplied, only Products this Managed API is associated with are returned.

Returns:

See Also:



2108
2109
2110
2111
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 2108

def list_products(params = {}, options = {})
  req = build_request(:list_products, params)
  req.send_request(options)
end

#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse

Lists the tags for an API Portal resource. One of the three basic tagging operations generated for Tagris integration (ListTagsForResource / TagResource / UntagResource).

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "ResourceArn", # required
})

Response structure


resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :resource_arn (required, String) —

    The ARN of the resource.

Returns:

See Also:



2139
2140
2141
2142
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 2139

def list_tags_for_resource(params = {}, options = {})
  req = build_request(:list_tags_for_resource, params)
  req.send_request(options)
end

#put_discovery_configuration(params = {}) ⇒ Types::PutDiscoveryConfigurationResponse

Creates or updates the discovery configuration

Examples:

Request syntax with placeholder values


resp = client.put_discovery_configuration({
  discovery_sources: ["API_GATEWAY"], # accepts API_GATEWAY, ELB, CLOUDFRONT
  excluded_resources: ["ResourceArn"],
  features: ["AI_DISCOVERY"], # accepts AI_DISCOVERY
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.discovery_configuration.arn #=> String
resp.discovery_configuration.status #=> String, one of "DISABLED", "ENABLED", "UPDATING"
resp.discovery_configuration.discovery_sources #=> Array
resp.discovery_configuration.discovery_sources[0] #=> String, one of "API_GATEWAY", "ELB", "CLOUDFRONT"
resp.discovery_configuration.excluded_resources #=> Array
resp.discovery_configuration.excluded_resources[0] #=> String
resp.discovery_configuration.features #=> Array
resp.discovery_configuration.features[0] #=> String, one of "AI_DISCOVERY"
resp.discovery_configuration.created_at #=> Time
resp.discovery_configuration.updated_at #=> Time
resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :discovery_sources (Array<String>) —

    The sources to discover APIs from. Omitting it removes all sources, which stops discovery for this configuration.

  • :excluded_resources (Array<String>) —

    The ARNs of resources to leave out of discovery, up to 50.

  • :features (Array<String>) —

    Optional capabilities to enable. Omitting it disables all of them, as with the other fields.

  • :tags (Hash<String,String>) —

    Up to 50 tags per request, matching API Gateway's limit of 50 tags per resource.

Returns:

See Also:



2196
2197
2198
2199
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 2196

def put_discovery_configuration(params = {}, options = {})
  req = build_request(:put_discovery_configuration, params)
  req.send_request(options)
end

#put_organization_discovery_configuration(params = {}) ⇒ Types::PutOrganizationDiscoveryConfigurationResponse

Creates or updates the organization-wide discovery configuration. This is a singleton per organization. Only the organization management account and registered delegated administrators may call this operation.

Examples:

Request syntax with placeholder values


resp = client.put_organization_discovery_configuration({
  discovery_sources: ["API_GATEWAY"], # accepts API_GATEWAY, ELB, CLOUDFRONT
  exclusion_filters: {
    organizational_unit_ids: ["OrganizationalUnitId"],
    account_ids: ["AccountId"],
    resource_arns: ["ResourceArn"],
  },
  discovery_filters: {
    exclusion_filters: {
      organizational_unit_ids: ["OrganizationalUnitId"],
      account_ids: ["AccountId"],
      resource_arns: ["ResourceArn"],
    },
    inclusion_filters: {
      organizational_unit_ids: ["OrganizationalUnitId"],
      account_ids: ["AccountId"],
    },
  },
  features: ["AI_DISCOVERY"], # accepts AI_DISCOVERY
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.discovery_configuration.arn #=> String
resp.discovery_configuration.status #=> String, one of "DISABLED", "ENABLED", "UPDATING"
resp.discovery_configuration.discovery_sources #=> Array
resp.discovery_configuration.discovery_sources[0] #=> String, one of "API_GATEWAY", "ELB", "CLOUDFRONT"
resp.discovery_configuration.exclusion_filters.organizational_unit_ids #=> Array
resp.discovery_configuration.exclusion_filters.organizational_unit_ids[0] #=> String
resp.discovery_configuration.exclusion_filters. #=> Array
resp.discovery_configuration.exclusion_filters.[0] #=> String
resp.discovery_configuration.exclusion_filters.resource_arns #=> Array
resp.discovery_configuration.exclusion_filters.resource_arns[0] #=> String
resp.discovery_configuration.discovery_filters.exclusion_filters.organizational_unit_ids #=> Array
resp.discovery_configuration.discovery_filters.exclusion_filters.organizational_unit_ids[0] #=> String
resp.discovery_configuration.discovery_filters.exclusion_filters. #=> Array
resp.discovery_configuration.discovery_filters.exclusion_filters.[0] #=> String
resp.discovery_configuration.discovery_filters.exclusion_filters.resource_arns #=> Array
resp.discovery_configuration.discovery_filters.exclusion_filters.resource_arns[0] #=> String
resp.discovery_configuration.discovery_filters.inclusion_filters.organizational_unit_ids #=> Array
resp.discovery_configuration.discovery_filters.inclusion_filters.organizational_unit_ids[0] #=> String
resp.discovery_configuration.discovery_filters.inclusion_filters. #=> Array
resp.discovery_configuration.discovery_filters.inclusion_filters.[0] #=> String
resp.discovery_configuration.features #=> Array
resp.discovery_configuration.features[0] #=> String, one of "AI_DISCOVERY"
resp.discovery_configuration.created_at #=> Time
resp.discovery_configuration.updated_at #=> Time
resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :discovery_sources (Array<String>) —

    The sources to discover APIs from. Omitting it removes all sources, which stops discovery for this configuration.

  • :exclusion_filters (Types::DiscoveryExclusionFilters) —

    Exclusion filters for organization-scoped discovery. @deprecated. Remove this once client (Console) moves to discoveryFilters

  • :discovery_filters (Types::OrganizationDiscoveryFilters) —

    The accounts or organizational units to include in or exclude from discovery.

  • :features (Array<String>) —

    Optional capabilities to enable. Omitting it disables all of them, as with the other fields.

  • :tags (Hash<String,String>) —

    Up to 50 tags per request, matching API Gateway's limit of 50 tags per resource.

Returns:

See Also:



2290
2291
2292
2293
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 2290

def put_organization_discovery_configuration(params = {}, options = {})
  req = build_request(:put_organization_discovery_configuration, params)
  req.send_request(options)
end

#put_product_sharing_policy(params = {}) ⇒ Struct

Creates or replaces the sharing policy of a product. The policy controls which other accounts can read the product.

Examples:

Request syntax with placeholder values


resp = client.put_product_sharing_policy({
  product_id: "ProductId", # required
  policy_document: "PolicyDocument", # required
  tags: {
    "TagKey" => "TagValue",
  },
})

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :product_id (required, String) —

    The identifier of the product.

  • :policy_document (required, String) —

    The sharing policy as a JSON resource policy document.

  • :tags (Hash<String,String>) —

    Up to 50 tags per request, matching API Gateway's limit of 50 tags per resource.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



2324
2325
2326
2327
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 2324

def put_product_sharing_policy(params = {}, options = {})
  req = build_request(:put_product_sharing_policy, params)
  req.send_request(options)
end

#start_discovery(params = {}) ⇒ Struct

Starts the API discovery process.

Examples:

Request syntax with placeholder values


resp = client.start_discovery({
  id: "StringWithLengthBetween1And1600", # required
})

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :id (required, String) —

    Identifier of the discovery configuration to start. Required. Today this is the configuration ARN, which carries the owner account id so a delegated admin or org admin can start an org-scoped configuration that lives in a different account.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



2349
2350
2351
2352
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 2349

def start_discovery(params = {}, options = {})
  req = build_request(:start_discovery, params)
  req.send_request(options)
end

#stop_discovery(params = {}) ⇒ Struct

Stops the running API discovery process.

Examples:

Request syntax with placeholder values


resp = client.stop_discovery({
  id: "StringWithLengthBetween1And1600", # required
})

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :id (required, String) —

    Identifier of the discovery configuration to stop. Required. Today this is the configuration ARN, which carries the owner account id so a delegated admin or org admin can stop an org-scoped configuration that lives in a different account.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



2374
2375
2376
2377
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 2374

def stop_discovery(params = {}, options = {})
  req = build_request(:stop_discovery, params)
  req.send_request(options)
end

#tag_resource(params = {}) ⇒ Struct

Adds or updates tags on an API Portal resource. One of the three basic tagging operations generated for Tagris integration (ListTagsForResource / TagResource / UntagResource).

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "ResourceArn", # required
  tags: { # required
    "TagKey" => "TagValue",
  },
})

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :resource_arn (required, String) —

    The ARN of the resource.

  • :tags (required, Hash<String,String>) —

    Up to 50 tags per request, matching API Gateway's limit of 50 tags per resource.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



2405
2406
2407
2408
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 2405

def tag_resource(params = {}, options = {})
  req = build_request(:tag_resource, params)
  req.send_request(options)
end

#untag_resource(params = {}) ⇒ Struct

Removes tags from an API Portal resource. One of the three basic tagging operations generated for Tagris integration (ListTagsForResource / TagResource / UntagResource).

tagKeys is a query string parameter: for tag-based access control (TBAC/ABAC) to work correctly, API Gateway requires the keys to be removed to be passed as a query string parameter.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  resource_arn: "ResourceArn", # required
  tag_keys: ["TagKey"], # required
})

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :resource_arn (required, String) —

    The ARN of the resource.

  • :tag_keys (required, Array<String>) —

    The keys of the tags to remove, up to 50.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



2437
2438
2439
2440
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 2437

def untag_resource(params = {}, options = {})
  req = build_request(:untag_resource, params)
  req.send_request(options)
end

#update_portal(params = {}) ⇒ Types::UpdatePortalResponse

Updates a portal. Only the fields supplied in the request are changed.

Examples:

Request syntax with placeholder values


resp = client.update_portal({
  portal_id: "PortalId", # required
  portal_content: {
    display_name: "PortalName", # required
    description: "PortalDescription",
    theme: { # required
      custom_colors: { # required
        background_color: "Color", # required
        navigation_color: "Color", # required
        header_color: "Color", # required
        text_color: "Color", # required
        accent_color: "Color", # required
        error_validation_color: "Color", # required
      },
      logo_uploaded_at: Time.now,
    },
  },
  endpoint_configuration: {
    none: {
    },
    acm_managed: {
      domain_name: "PortalDomainName", # required
      certificate_arn: "CertificateArn", # required
    },
  },
  authorization: {
    authorization_config: { # required
      none: {
      },
      cognito_config: {
        user_pool_arn: "UserPoolArn", # required
        app_client_id: "AppClientId", # required
        user_pool_domain: "UserPoolDomain", # required
        identity_pool_id: "IdentityPoolId",
      },
    },
    fine_grained_access_control: "ENABLED", # required, accepts ENABLED, DISABLED
  },
  rum_app_monitor_name: "RUMAppMonitorName",
  included_product_arns: ["ProductArn"],
  logo_uri: "LogoUri",
})

Response structure


resp.portal_id #=> String
resp.portal_arn #=> String
resp.endpoint_configuration.domain_name #=> String
resp.endpoint_configuration.certificate_arn #=> String
resp.endpoint_configuration.portal_domain_hosted_zone_id #=> String
resp.endpoint_configuration.portal_default_domain_name #=> String
resp.authorization.authorization_config.cognito_config.user_pool_arn #=> String
resp.authorization.authorization_config.cognito_config.app_client_id #=> String
resp.authorization.authorization_config.cognito_config.user_pool_domain #=> String
resp.authorization.authorization_config.cognito_config.identity_pool_id #=> String
resp.authorization.fine_grained_access_control #=> String, one of "ENABLED", "DISABLED"
resp.portal_content.display_name #=> String
resp.portal_content.description #=> String
resp.portal_content.theme.custom_colors.background_color #=> String
resp.portal_content.theme.custom_colors.navigation_color #=> String
resp.portal_content.theme.custom_colors.header_color #=> String
resp.portal_content.theme.custom_colors.text_color #=> String
resp.portal_content.theme.custom_colors.accent_color #=> String
resp.portal_content.theme.custom_colors.error_validation_color #=> String
resp.portal_content.theme.logo_uploaded_at #=> Time
resp.included_product_arns #=> Array
resp.included_product_arns[0] #=> String
resp.publish_status #=> String, one of "PUBLISHED", "PUBLISH_IN_PROGRESS", "PUBLISH_FAILED", "DISABLE_IN_PROGRESS", "DISABLE_FAILED", "DISABLED"
resp.status_exception.exception #=> String, one of "INTERNAL_FAILURE", "UNSHARED_PRODUCT_EXCEPTION", "CLOUDFRONT_DOMAIN_IN_USE", "MISSING_CLOUDFRONT_PERMISSIONS"
resp.status_exception.message #=> String
resp.updated_at #=> Time
resp.published_at #=> Time
resp.publish_description #=> String
resp.rum_app_monitor_name #=> String
resp.preview.preview_status #=> String, one of "PREVIEW_IN_PROGRESS", "PREVIEW_FAILED", "PREVIEW_READY"
resp.preview.status_exception.exception #=> String, one of "INTERNAL_FAILURE", "UNSHARED_PRODUCT_EXCEPTION", "CLOUDFRONT_DOMAIN_IN_USE", "MISSING_CLOUDFRONT_PERMISSIONS"
resp.preview.status_exception.message #=> String
resp.preview.preview_url #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :portal_id (required, String) —

    The identifier of the portal.

  • :portal_content (Types::PortalContent) —

    The new display name, description, and theme. Omit it to keep the current values.

  • :endpoint_configuration (Types::EndpointConfigurationRequest) —

    Exactly one of the members is set: none for no custom domain, or acmManaged to bring a domain + ACM certificate. Modeled as a union so the "exactly one" choice is enforced by type.

  • :authorization (Types::Authorization) —

    The new authorization settings. Omit it to keep the current settings.

  • :rum_app_monitor_name (String) —

    The new CloudWatch RUM app monitor name. Omit it to keep the current value.

  • :included_product_arns (Array<String>) —

    The new list of product ARNs, up to 200. It replaces the current list. Omit it to keep the current list.

  • :logo_uri (String) —

    The new S3 location of the portal logo, in the form s3://bucket/key. An empty string removes the logo. Omit it to keep the current logo.

Returns:

See Also:



2572
2573
2574
2575
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 2572

def update_portal(params = {}, options = {})
  req = build_request(:update_portal, params)
  req.send_request(options)
end

#update_portal_publish_status(params = {}) ⇒ Struct

Publishes or disables a portal. The change runs asynchronously. Use GetPortal to track publishStatus.

Examples:

Request syntax with placeholder values


resp = client.update_portal_publish_status({
  portal_id: "PortalId", # required
  status: "PUBLISHED", # required, accepts PUBLISHED, DISABLED
  description: "PublishDescription",
})

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :portal_id (required, String) —

    The identifier of the portal.

  • :status (required, String) —

    The terminal publish state a caller can request for a portal via UpdatePortalPublishStatus. Only the two client-requestable targets are modeled here; the transient and failed states in PublishStatus are set by the service and are not valid caller input.

  • :description (String) —

    A description of this publish request, up to 1024 characters.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



2606
2607
2608
2609
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 2606

def update_portal_publish_status(params = {}, options = {})
  req = build_request(:update_portal_publish_status, params)
  req.send_request(options)
end

#update_product(params = {}) ⇒ Types::UpdateProductResponse

Updates a product. Only the fields supplied in the request are changed.

Examples:

Request syntax with placeholder values


resp = client.update_product({
  product_id: "ProductId", # required
  display_name: "ProductName",
  description: "ProductDescription",
  display_order: {
    overview_page_arn: "ProductPageArn",
    product_page_arns: ["ProductPageArn"],
    contents: [
      {
        section_name: "SectionSectionNameString",
        product_api_page_arns: ["ProductApiPageArn"],
      },
    ],
  },
  api_selection_configuration: {
    api_selection_mode: "CUSTOM", # required, accepts CUSTOM, RULE_BASED
    rule_filters: [
      {
        key: "RESOURCE_ARN", # required, accepts RESOURCE_ARN, HOST, METHOD, PATH, PORT, ACCOUNT
        values: ["RuleFilterValue"], # required
      },
    ],
  },
})

Response structure


resp.product_id #=> String
resp.product_arn #=> String
resp.display_name #=> String
resp.display_order.overview_page_arn #=> String
resp.display_order.product_page_arns #=> Array
resp.display_order.product_page_arns[0] #=> String
resp.display_order.contents #=> Array
resp.display_order.contents[0].section_name #=> String
resp.display_order.contents[0].product_api_page_arns #=> Array
resp.display_order.contents[0].product_api_page_arns[0] #=> String
resp.description #=> String
resp.updated_at #=> Time
resp.api_selection_configuration.api_selection_mode #=> String, one of "CUSTOM", "RULE_BASED"
resp.api_selection_configuration.rule_filters #=> Array
resp.api_selection_configuration.rule_filters[0].key #=> String, one of "RESOURCE_ARN", "HOST", "METHOD", "PATH", "PORT", "ACCOUNT"
resp.api_selection_configuration.rule_filters[0].values #=> Array
resp.api_selection_configuration.rule_filters[0].values[0] #=> String
resp.status #=> String, one of "ACTIVE", "IN_PROGRESS", "FAILED"
resp.failure_reason #=> String, one of "API_PAGE_ATTACHED", "EVALUATION_ERROR"

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :product_id (required, String) —

    The identifier of the product.

  • :display_name (String) —

    The new name of the product. Omit it to keep the current name.

  • :description (String) —

    The new description of the product. Omit it to keep the current description.

  • :display_order (Types::DisplayOrder) —

    The new page order. Omit it to keep the current order.

  • :api_selection_configuration (Types::ApiSelectionConfiguration) —

    The new API selection settings. The selection mode must match the mode the product was created with. Omit it to keep the current settings.

Returns:

See Also:



2696
2697
2698
2699
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 2696

def update_product(params = {}, options = {})
  req = build_request(:update_product, params)
  req.send_request(options)
end

#update_product_api_page(params = {}) ⇒ Types::UpdateProductApiPageResponse

Updates an API page. Only the fields supplied in the request are changed.

Examples:

Request syntax with placeholder values


resp = client.update_product_api_page({
  product_id: "ProductId", # required
  product_api_page_id: "ProductApiPageId", # required
  display_content: {
    none: {
    },
    overrides: {
      operation_name: "OperationName",
      api_url: "DisplayContentOverridesApiUrlString",
      body: "ApiPageBody",
    },
  },
  try_it_state: "ENABLED", # accepts ENABLED, DISABLED
})

Response structure


resp.product_api_page_id #=> String
resp.product_api_page_arn #=> String
resp.api_id.identifier_parts.path #=> String
resp.api_id.identifier_parts.method #=> String
resp.api_id.identifier_parts.resource_arn #=> String
resp.display_content.operation_name #=> String
resp.display_content.api_url #=> String
resp.display_content.body #=> String
resp.try_it_state #=> String, one of "ENABLED", "DISABLED"
resp.updated_at #=> Time
resp.status #=> String, one of "AVAILABLE", "IN_PROGRESS", "FAILED"
resp.status_exception.exception #=> String, one of "INTERNAL_FAILURE", "RESOURCE_DELETED", "MEMBER_LEFT_ORG"
resp.status_exception.message #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :product_id (required, String) —

    The identifier of the product.

  • :product_api_page_id (required, String) —

    The identifier of the API page.

  • :display_content (Types::ApiPageDisplayContent) —

    Exactly one of the members is set: none to use default display content, or overrides to customize it. Modeled as a union so the "exactly one" choice is enforced by type.

  • :try_it_state (String) —

    The new Try-It setting. Omit it to keep the current setting. To enable it, the page's API URL must use HTTPS on a domain that supports Try-It.

Returns:

See Also:



2768
2769
2770
2771
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 2768

def update_product_api_page(params = {}, options = {})
  req = build_request(:update_product_api_page, params)
  req.send_request(options)
end

#update_product_page(params = {}) ⇒ Types::UpdateProductPageResponse

Updates a product page.

Examples:

Request syntax with placeholder values


resp = client.update_product_page({
  product_id: "ProductId", # required
  product_page_id: "ProductPageId", # required
  display_content: {
    title: "PageTitle", # required
    body: "PageBody", # required
  },
})

Response structure


resp.product_page_id #=> String
resp.product_page_arn #=> String
resp.display_content.title #=> String
resp.display_content.body #=> String
resp.updated_at #=> Time

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :product_id (required, String) —

    The identifier of the product.

  • :product_page_id (required, String) —

    The identifier of the product page.

  • :display_content (Types::DisplayContent) —

    The new title and body of the page. Omit it to keep the current content.

Returns:

See Also:



2815
2816
2817
2818
# File 'gems/aws-sdk-apiportal/lib/aws-sdk-apiportal/client.rb', line 2815

def update_product_page(params = {}, options = {})
  req = build_request(:update_product_page, params)
  req.send_request(options)
end