hubs
Creates, updates, deletes, gets or lists a hubs resource.
Overview
| Name | hubs |
| Type | Resource |
| Id | aws.sagemaker.hubs |
Fields
The following fields are returned by SELECT queries:
- describe_hub
- list_hubs
| Name | Datatype | Description |
|---|---|---|
creation_time | string (date-time) | The date and time that the hub was created. |
failure_reason | string | The failure reason if importing hub content failed. |
hub_arn | string | The Amazon Resource Name (ARN) of the hub. (pattern: <code>.*</code>) |
hub_description | string | A description of the hub. (pattern: <code>.*</code>) |
hub_display_name | string | The display name of the hub. (pattern: <code>.*</code>) |
hub_name | string | The name of the hub. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>) |
hub_search_keywords | array | The searchable keywords for the hub. |
hub_status | string | The status of the hub. (InService, Creating, Updating, Deleting, CreateFailed, UpdateFailed, DeleteFailed) |
last_modified_time | string (date-time) | The date and time that the hub was last modified. |
s3_storage_config | object | The Amazon S3 storage configuration for the hub. |
| Name | Datatype | Description |
|---|---|---|
hub_summaries | array | The summaries of the listed hubs. |
next_token | string | If the response is truncated, SageMaker returns this token. To retrieve the next set of hubs, use it in the subsequent request. (pattern: <code>.*</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_hub | select | region | Describes a hub. | |
list_hubs | select | region | List all existing hubs. | |
create_hub | insert | region, HubName, HubDescription | Create a hub. | |
update_hub | update | region, HubName | Update a hub. | |
delete_hub | delete | region | Delete a hub. | |
import_hub_content | exec | region, HubContentName, HubContentType, DocumentSchemaVersion, HubName, HubContentDocument | Import hub content. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_hub
- list_hubs
Describes a hub.
SELECT
creation_time,
failure_reason,
hub_arn,
hub_description,
hub_display_name,
hub_name,
hub_search_keywords,
hub_status,
last_modified_time,
s3_storage_config
FROM aws.sagemaker.hubs
WHERE region = '{{ region }}' -- required
;
List all existing hubs.
SELECT
hub_summaries,
next_token
FROM aws.sagemaker.hubs
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_hub
- Manifest
Create a hub.
INSERT INTO aws.sagemaker.hubs (
HubName,
HubDescription,
HubDisplayName,
HubSearchKeywords,
S3StorageConfig,
Tags,
region
)
SELECT
'{{ HubName }}' /* required */,
'{{ HubDescription }}' /* required */,
'{{ HubDisplayName }}',
'{{ HubSearchKeywords }}',
'{{ S3StorageConfig }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
hub_arn
;
# Description fields are for documentation purposes
- name: hubs
props:
- name: region
value: "{{ region }}"
description: Required parameter for the hubs resource.
- name: HubName
value: "{{ HubName }}"
description: |
The name of the hub to create.
- name: HubDescription
value: "{{ HubDescription }}"
description: |
A description of the hub.
- name: HubDisplayName
value: "{{ HubDisplayName }}"
description: |
The display name of the hub.
- name: HubSearchKeywords
value:
- "{{ HubSearchKeywords }}"
description: |
The searchable keywords for the hub.
- name: S3StorageConfig
description: |
The Amazon S3 storage configuration for the hub.
value:
S3OutputPath: "{{ S3OutputPath }}"
- name: Tags
description: |
Any tags to associate with the hub.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- update_hub
Update a hub.
UPDATE aws.sagemaker.hubs
SET
HubName = '{{ HubName }}',
HubDescription = '{{ HubDescription }}',
HubDisplayName = '{{ HubDisplayName }}',
HubSearchKeywords = '{{ HubSearchKeywords }}'
WHERE
region = '{{ region }}' --required
AND HubName = '{{ HubName }}' --required
RETURNING
hub_arn;
DELETE examples
- delete_hub
Delete a hub.
DELETE FROM aws.sagemaker.hubs
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- import_hub_content
Import hub content.
EXEC aws.sagemaker.hubs.import_hub_content
@region='{{ region }}' --required
@@json=
'{
"HubContentName": "{{ HubContentName }}",
"HubContentVersion": "{{ HubContentVersion }}",
"HubContentType": "{{ HubContentType }}",
"DocumentSchemaVersion": "{{ DocumentSchemaVersion }}",
"HubName": "{{ HubName }}",
"HubContentDisplayName": "{{ HubContentDisplayName }}",
"HubContentDescription": "{{ HubContentDescription }}",
"HubContentMarkdown": "{{ HubContentMarkdown }}",
"HubContentDocument": "{{ HubContentDocument }}",
"SupportStatus": "{{ SupportStatus }}",
"HubContentSearchKeywords": "{{ HubContentSearchKeywords }}",
"Tags": "{{ Tags }}"
}'
;