stage#

State module for managing Amazon API Gateway Stages.

async idem_aws.states.aws.apigateway.stage.present(hub, ctx, name: str, rest_api_id: str, deployment_id: str, resource_id: str = None, description: str = None, cache_cluster_enabled: bool = None, cache_cluster_size: str = None, variables: dict = None, documentation_version: str = None, canary_settings: canarySettings = None, tracing_enabled: bool = None, tags: dict = None)[source]#

Creates a new API Gateway Stage or modifies an existing one.

Parameters:
  • name (str) – An Idem name of the resource. Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters.

  • rest_api_id (str) – The string identifier of the associated RestApi.

  • deployment_id (str) – The identifier of the Deployment resource for the Stage resource.

  • resource_id (str, Optional) – AWS API Gateway Stage ID, in the form of ‘<rest_api_id>-<name>’.

  • description (str, Optional) – The description of the Stage resource.

  • cache_cluster_enabled (bool, Optional) – Whether cache clustering is enabled for the stage.

  • cache_cluster_size (str, Optional) – The stage’s cache cluster size.

  • variables (dict, Optional) – A map that defines the stage variables for the new Stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+ .

  • documentation_version (str, Optional) – The version of the associated API documentation.

  • canary_settings (dict, Optional) –

    The canary deployment settings of this stage.

    • percentTraffic (float) –

    The percent (0-100) of traffic diverted to a canary deployment.

    • deploymentId (string) –

    The ID of the canary deployment.

    • stageVariableOverrides (dict) –

    Stage variables overridden for a canary release deployment, including new stage variables introduced in the canary. These stage variables are represented as a string-to-string map between stage variable names and their values. Dict of string: string.

    • useStageCache (boolean) –

    A Boolean flag to indicate whether the canary deployment uses the stage cache or not.

  • tracing_enabled (bool, Optional) – Specifies whether active tracing with X-ray is enabled for the Stage.

  • tags (dict, Optional) – The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with aws: . The tag value can be up to 256 characters.

Request Syntax:
[idem_test_aws_apigateway_stage]:
aws.apigateway.stage.present:
  • name: ‘string’

  • description: ‘string’

  • rest_api_id: ‘string’

  • deployment_id: ‘string’

  • resource_id: ‘string-string’

  • cache_cluster_enabled: bool

  • cache_cluster_size: ‘string’

  • variables:
    • ‘string’ : ‘string’

  • canary_settings:
    • percentTraffic: float

    • deploymentId: ‘string’

    • useStageCache: bool

  • tracing_enabled: bool

  • document_version: ‘string’

  • tags:
    • ‘string’: ‘string’

Returns:

Dict[str, Any]

Examples

resource_is_present:
  aws.apigateway.stage.present:
    - name: value
    - rest_api_id: value
    - deployment_id: value
async idem_aws.states.aws.apigateway.stage.absent(hub, ctx, name: str, resource_id: str = None) Dict[str, Any][source]#

Deletes a Stage resource.

Parameters:
  • name (str) – An Idem name of the resource.

  • resource_id (str, Optional) – AWS API Gateway Stage ID. Idem automatically considers this resource being absent if this field is not specified. in the form of ‘<rest_api_id>-<name>’

Returns:

Dict[str, Any]

Examples

resource_is_absent:
  aws.apigateway.stage.absent:
    - name: value
    - resource_id: value
async idem_aws.states.aws.apigateway.stage.describe(hub, ctx) Dict[str, Dict[str, Any]][source]#

Describe the API Gateway Stages.

Returns a list of apigateway.stage descriptions

Returns:

Dict[str, Any]

Examples

$ idem describe aws.apigateway.stage