runway.cfngin.hooks.iam module

AWS IAM hook.

pydantic model runway.cfngin.hooks.iam.CreateEcsServiceRoleHookArgs[source]

Bases: BaseModel

Hook arguments for create_ecs_service_role.

Show JSON schema
{
   "title": "CreateEcsServiceRoleHookArgs",
   "description": "Hook arguments for ``create_ecs_service_role``.",
   "type": "object",
   "properties": {
      "role_name": {
         "default": "ecsServiceRole",
         "title": "Role Name",
         "type": "string"
      }
   }
}

field role_name: str = 'ecsServiceRole'

Name of the role to create.

pydantic model runway.cfngin.hooks.iam.EnsureServerCertExistsHookArgs[source]

Bases: BaseModel

Hook arguments for ensure_server_cert_exists.

Show JSON schema
{
   "title": "EnsureServerCertExistsHookArgs",
   "description": "Hook arguments for ``ensure_server_cert_exists``.",
   "type": "object",
   "properties": {
      "cert_name": {
         "title": "Cert Name",
         "type": "string"
      },
      "path_to_certificate": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Path To Certificate"
      },
      "path_to_chain": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Path To Chain"
      },
      "path_to_private_key": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Path To Private Key"
      },
      "prompt": {
         "default": true,
         "title": "Prompt",
         "type": "boolean"
      }
   },
   "required": [
      "cert_name"
   ]
}

field cert_name: str = PydanticUndefined

Name of the certificate that should exist.

field path_to_certificate: str | None = None

Path to certificate file.

field path_to_chain: str | None = None

Path to chain file.

field path_to_private_key: str | None = None

Path to private key file.

field prompt: bool = True

Whether to prompt to upload a certificate if one does not exist.

runway.cfngin.hooks.iam.create_ecs_service_role(context: runway.context.CfnginContext, *_args: Any, **kwargs: Any) bool[source]

Create ecsServiceRole IAM role.

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using-service-linked-roles.html

Parameters:
  • context – Context instance. (passed in by CFNgin)

  • **kwargs – Arbitrary keyword arguments.

runway.cfngin.hooks.iam.ensure_server_cert_exists(context: runway.context.CfnginContext, *_args: Any, **kwargs: Any) dict[str, str][source]

Ensure server cert exists.

Parameters:
  • context – CFNgin context object.

  • **kwargs – Arbitrary keyword arguments.

Returns:

Dict containing status, cert_name, and cert_arn.