Skip to main content

hubs

Creates, updates, deletes, gets or lists a hubs resource.

Overview

Namehubs
TypeResource
Idaws.sagemaker.hubs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestring (date-time)The date and time that the hub was created.
failure_reasonstringThe failure reason if importing hub content failed.
hub_arnstringThe Amazon Resource Name (ARN) of the hub. (pattern: <code>.*</code>)
hub_descriptionstringA description of the hub. (pattern: <code>.*</code>)
hub_display_namestringThe display name of the hub. (pattern: <code>.*</code>)
hub_namestringThe name of the hub. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>)
hub_search_keywordsarrayThe searchable keywords for the hub.
hub_statusstringThe status of the hub. (InService, Creating, Updating, Deleting, CreateFailed, UpdateFailed, DeleteFailed)
last_modified_timestring (date-time)The date and time that the hub was last modified.
s3_storage_configobjectThe Amazon S3 storage configuration for the hub.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_hubselectregionDescribes a hub.
list_hubsselectregionList all existing hubs.
create_hubinsertregion, HubName, HubDescriptionCreate a hub.
update_hubupdateregion, HubNameUpdate a hub.
delete_hubdeleteregionDelete a hub.
import_hub_contentexecregion, HubContentName, HubContentType, DocumentSchemaVersion, HubName, HubContentDocumentImport 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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 a hub.

DELETE FROM aws.sagemaker.hubs
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

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 }}"
}'
;