gateways
Creates, updates, deletes or gets a gateway resource or lists gateways in a region
Overview
| Name | gateways |
| Type | Resource |
| Description | Resource schema for AWS::MediaConnect::Gateway |
| Id | awscc.mediaconnect.gateways |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the gateway. This name can not be modified after the gateway is created. |
gateway_arn | string | The Amazon Resource Name (ARN) of the gateway. |
gateway_state | string | The current status of the gateway. |
egress_cidr_blocks | array | The range of IP addresses that contribute content or initiate output requests for flows communicating with this gateway. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16. |
networks | array | The list of networks in the gateway. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
gateway_arn | string | The Amazon Resource Name (ARN) of the gateway. |
region | string | AWS region. |
For more information, see AWS::MediaConnect::Gateway.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | gateways | INSERT | Name, EgressCidrBlocks, Networks, region |
delete_resource | gateways | DELETE | Identifier, region |
list_resources | gateways_list_only | SELECT | region |
get_resource | gateways | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual gateway.
SELECT
region,
name,
gateway_arn,
gateway_state,
egress_cidr_blocks,
networks
FROM awscc.mediaconnect.gateways
WHERE
region = '{{ region }}' AND
Identifier = '{{ gateway_arn }}';
Lists all gateways in a region.
SELECT
region,
gateway_arn
FROM awscc.mediaconnect.gateways_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new gateway resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.mediaconnect.gateways (
Name,
EgressCidrBlocks,
Networks,
region
)
SELECT
'{{ name }}',
'{{ egress_cidr_blocks }}',
'{{ networks }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.mediaconnect.gateways (
Name,
EgressCidrBlocks,
Networks,
region
)
SELECT
'{{ name }}',
'{{ egress_cidr_blocks }}',
'{{ networks }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: gateway
props:
- name: name
value: '{{ name }}'
- name: egress_cidr_blocks
value:
- '{{ egress_cidr_blocks[0] }}'
- name: networks
value:
- name: '{{ name }}'
cidr_block: '{{ cidr_block }}'
DELETE example
/*+ delete */
DELETE FROM awscc.mediaconnect.gateways
WHERE
Identifier = '{{ gateway_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the gateways resource, the following permissions are required:
- Create
- Read
- Delete
- List
iam:CreateServiceLinkedRole,
mediaconnect:CreateGateway,
mediaconnect:DescribeGateway
mediaconnect:DescribeGateway
iam:CreateServiceLinkedRole,
mediaconnect:DescribeGateway,
mediaconnect:DeleteGateway
mediaconnect:ListGateways