Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add sagemaker resource types #2

Merged
merged 16 commits into from
Dec 28, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions aws-sagemaker-project/.rpdk-config
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"typeName": "AWS::SageMaker::Project",
"language": "java",
"runtime": "java8",
"entrypoint": "software.amazon.sagemaker.project.HandlerWrapper::handleRequest",
"testEntrypoint": "software.amazon.sagemaker.project.HandlerWrapper::testEntrypoint",
"settings": {
"version": false,
"subparser_name": null,
"verbose": 0,
"force": false,
"type_name": null,
"namespace": [
"software",
"amazon",
"sagemaker",
"project"
],
"codegen_template_path": "guided_aws",
"protocolVersion": "2.0.0"
}
}
118 changes: 118 additions & 0 deletions aws-sagemaker-project/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# AWS::SageMaker::Project

Resource Type definition for AWS::SageMaker::Project

## Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

### JSON

<pre>
{
"Type" : "AWS::SageMaker::Project",
"Properties" : {
"<a href="#tags" title="Tags">Tags</a>" : <i>[ <a href="tag.md">Tag</a>, ... ]</i>,
"<a href="#projectname" title="ProjectName">ProjectName</a>" : <i>String</i>,
"<a href="#projectdescription" title="ProjectDescription">ProjectDescription</a>" : <i>String</i>,
"<a href="#servicecatalogprovisioningdetails" title="ServiceCatalogProvisioningDetails">ServiceCatalogProvisioningDetails</a>" : <i><a href="servicecatalogprovisioningdetails.md">ServiceCatalogProvisioningDetails</a></i>,
}
}
</pre>

### YAML

<pre>
Type: AWS::SageMaker::Project
Properties:
<a href="#tags" title="Tags">Tags</a>: <i>
- <a href="tag.md">Tag</a></i>
<a href="#projectname" title="ProjectName">ProjectName</a>: <i>String</i>
<a href="#projectdescription" title="ProjectDescription">ProjectDescription</a>: <i>String</i>
<a href="#servicecatalogprovisioningdetails" title="ServiceCatalogProvisioningDetails">ServiceCatalogProvisioningDetails</a>: <i><a href="servicecatalogprovisioningdetails.md">ServiceCatalogProvisioningDetails</a></i>
</pre>

## Properties

#### Tags

An array of key-value pairs to apply to this resource.

_Required_: No

_Type_: List of <a href="tag.md">Tag</a>

_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

#### ProjectName

The name of the project.

_Required_: Yes

_Type_: String

_Minimum_: <code>1</code>

_Maximum_: <code>32</code>

_Pattern_: <code>^[a-zA-Z0-9](-*[a-zA-Z0-9])*$</code>

_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

#### ProjectDescription

The description of the project.

_Required_: No

_Type_: String

_Maximum_: <code>1024</code>

_Pattern_: <code>.*</code>

_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

#### ServiceCatalogProvisioningDetails

Input ServiceCatalog Provisioning Details

_Required_: Yes

_Type_: <a href="servicecatalogprovisioningdetails.md">ServiceCatalogProvisioningDetails</a>

_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return Values

### Ref

When you pass the logical ID of this resource to the intrinsic `Ref` function, Ref returns the ProjectArn.

### Fn::GetAtt

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [Fn::GetAtt](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html).

#### ProjectArn

The Amazon Resource Name (ARN) of the Project.

#### CreationTime

The time at which the project was created.

#### ProjectId

Project Id.

#### ServiceCatalogProvisionedProductDetails

Provisioned ServiceCatalog Details

#### ProjectStatus

The status of a project.

229 changes: 229 additions & 0 deletions aws-sagemaker-project/aws-sagemaker-project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
{
"typeName": "AWS::SageMaker::Project",
"description": "Resource Type definition for AWS::SageMaker::Project",
"definitions": {
"Tag" : {
"description" : "A key-value pair to associate with a resource.",
"type" : "object",
"properties" : {
"Key" : {
"type" : "string",
"description" : "The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ",
"minLength" : 1,
"maxLength" : 128,
"pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$"
},
"Value" : {
"type" : "string",
"description" : "The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ",
"maxLength" : 256,
"pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$"
}
},
"required" : [ "Key", "Value" ],
"additionalProperties": false
},
"ProjectDescription": {
"type" : "string",
"description" : "The description of the project.",
"pattern": ".*",
"maxLength" : 1024
},
"ProjectId": {
"type" : "string",
"description" : "Project Id.",
"pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*",
"maxLength" : 20
},
"ProvisionedProductStatusMessage": {
"type" : "string",
"description" : "Provisioned Product Status Message"
},
"ProjectName": {
"type" : "string",
"description" : "The name of the project.",
"pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$",
"minLength": 1,
"maxLength" : 32
},
"ProjectArn": {
"description": "The Amazon Resource Name (ARN) of the Project.",
"type" : "string",
"minLength": 1,
"maxLength": 2048,
"pattern": "arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:project.*"
},
"ProductId": {
"type" : "string",
"description" : "Service Catalog product identifier.",
"pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$",
"maxLength" : 100
},
"ProvisioningArtifactId": {
"type" : "string",
"description" : "The identifier of the provisioning artifact (also known as a version).",
"pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$",
"maxLength" : 100
},
"PathId": {
"type" : "string",
"description" : "The path identifier of the product.",
"pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$",
"maxLength" : 100
},
"ProvisioningParameter" : {
"description" : "Information about a parameter used to provision a product.",
"type" : "object",
"properties" : {
"Key" : {
"type" : "string",
"description" : "The parameter key.",
"minLength" : 1,
"maxLength" : 1000,
"pattern": ".*"
},
"Value" : {
"type" : "string",
"description" : "The parameter value.",
"maxLength" : 4096,
"pattern": ".*"
}
},
"required" : [ "Key", "Value" ],
"additionalProperties": false
}
},
"properties": {
"Tags" : {
"type" : "array",
"maxItems" : 40,
"description" : "An array of key-value pairs to apply to this resource.",
"items" : {
"$ref" : "#/definitions/Tag"
}
},
"ProjectArn": {
"$ref" : "#/definitions/ProjectArn"
},
"ProjectId": {
"$ref" : "#/definitions/ProjectId"
},
"ProjectName": {
"$ref" : "#/definitions/ProjectName"
},
"ProjectDescription": {
"$ref" : "#/definitions/ProjectDescription"
},
"CreationTime": {
"description": "The time at which the project was created.",
"type": "string"
},
"ServiceCatalogProvisioningDetails" : {
"description" : "Input ServiceCatalog Provisioning Details",
"type" : "object",
"properties" : {
"ProductId" : {
"$ref": "#/definitions/ProductId"
},
"ProvisioningArtifactId" : {
"$ref": "#/definitions/ProvisioningArtifactId"
},
"PathId" : {
"$ref": "#/definitions/PathId"
},
"ProvisioningParameters" : {
"type" : "array",
"description" : "Parameters specified by the administrator that are required for provisioning the product.",
"items" : {
"$ref": "#/definitions/ProvisioningParameter"
}
}
},
"required" : [ "ProductId", "ProvisioningArtifactId" ],
"additionalProperties": false
},
"ServiceCatalogProvisionedProductDetails" : {
"description" : "Provisioned ServiceCatalog Details",
"type" : "object",
"properties" : {
"ProvisionedProductId" : {
"$ref": "#/definitions/ProvisioningArtifactId"
},
"ProvisionedProductStatusMessage" : {
"$ref": "#/definitions/ProvisionedProductStatusMessage"
}
},
"additionalProperties": false
},
"ProjectStatus": {
"description": "The status of a project.",
"type": "string",
"enum": [
"Pending",
"CreateInProgress",
"CreateCompleted",
"CreateFailed",
"DeleteInProgress",
"DeleteFailed",
"DeleteCompleted"
]
}
},
"additionalProperties": false,
"required": [
"ProjectName",
"ServiceCatalogProvisioningDetails"
],
"readOnlyProperties": [
"/properties/ProjectArn",
"/properties/CreationTime",
"/properties/ProjectId",
"/properties/ServiceCatalogProvisionedProductDetails",
"/properties/ProjectStatus"
],
"createOnlyProperties": [
"/properties/ProjectName",
"/properties/ProjectDescription",
"/properties/ServiceCatalogProvisioningDetails",
"/properties/Tags"
],
"primaryIdentifier": [
"/properties/ProjectArn"
],
"handlers": {
"create": {
"permissions": [
"sagemaker:CreateProject",
"sagemaker:DescribeProject",
"servicecatalog:DescribeProduct",
"servicecatalog:DescribeProvisioningArtifact"
]
},
"read": {
"permissions": [
"sagemaker:DescribeProject",
"sagemaker:ListTags"
]
},
"update": {
"permissions": [
"sagemaker:DescribeProject",
"sagemaker:ListTags",
"sagemaker:AddTags",
"sagemaker:DeleteTags"
]
},
"delete": {
"permissions": [
"sagemaker:DeleteProject"
]
},
"list": {
"permissions": [
"sagemaker:ListProjects"
]
}
}
}


Loading