sdi_sources
Creates, updates, deletes or gets a sdi_source resource or lists sdi_sources in a region
Overview
| Name | sdi_sources |
| Type | Resource |
| Description | Definition of AWS::MediaLive::SdiSource Resource Type |
| Id | awscc.medialive.sdi_sources |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | The unique arn of the SdiSource. |
id | string | The unique identifier of the SdiSource. |
mode | string | The current state of the SdiSource. |
name | string | The name of the SdiSource. |
state | string | The current state of the SdiSource. |
type | string | The interface mode of the SdiSource. |
inputs | array | The list of inputs currently using this SDI source. |
tags | array | A collection of key-value pairs. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the SdiSource. |
region | string | AWS region. |
For more information, see AWS::MediaLive::SdiSource.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | sdi_sources | INSERT | Name, Type, region |
delete_resource | sdi_sources | DELETE | Identifier, region |
update_resource | sdi_sources | UPDATE | Identifier, PatchDocument, region |
list_resources | sdi_sources_list_only | SELECT | region |
get_resource | sdi_sources | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual sdi_source.
SELECT
region,
arn,
id,
mode,
name,
state,
type,
inputs,
tags
FROM awscc.medialive.sdi_sources
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';
Lists all sdi_sources in a region.
SELECT
region,
id
FROM awscc.medialive.sdi_sources_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new sdi_source resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.medialive.sdi_sources (
Name,
Type,
region
)
SELECT
'{{ name }}',
'{{ type }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.medialive.sdi_sources (
Mode,
Name,
Type,
Tags,
region
)
SELECT
'{{ mode }}',
'{{ name }}',
'{{ type }}',
'{{ tags }}',
'{{ 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: sdi_source
props:
- name: mode
value: '{{ mode }}'
- name: name
value: '{{ name }}'
- name: type
value: '{{ type }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a sdi_source resource, using stack-deploy.
/*+ update */
UPDATE awscc.medialive.sdi_sources
SET PatchDocument = string('{{ {
"Mode": mode,
"Name": name,
"Type": type,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.medialive.sdi_sources
WHERE
Identifier = '{{ id }}' 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 sdi_sources resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
medialive:CreateSdiSource,
medialive:CreateTags,
medialive:DescribeSdiSource,
medialive:ListTagsForResource
medialive:DescribeSdiSource,
medialive:ListTagsForResource
medialive:UpdateSdiSource,
medialive:DescribeSdiSource,
medialive:CreateTags,
medialive:DeleteTags,
medialive:ListTagsForResource
medialive:DeleteSdiSource,
medialive:DescribeSdiSource
medialive:ListSdiSources