@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api AWS IoT 1-Click Projects Service
@version 2018-05-14
@auth AWS SigV4
@endpoints 16
@toc projects(13), tags(3)

@group projects
@endpoint PUT /projects/{projectName}/placements/{placementName}/devices/{deviceTemplateName}
@desc Associates a physical device with a placement.
@required {projectName: str, placementName: str, deviceTemplateName: str, deviceId: str}

@endpoint POST /projects/{projectName}/placements
@desc Creates an empty placement.
@required {projectName: str, placementName: str}
@optional {attributes: map<str,str>}

@endpoint POST /projects
@desc Creates an empty project with a placement template. A project contains zero or more placements that adhere to the placement template defined in the project.
@required {projectName: str}
@optional {description: str, placementTemplate: PlacementTemplate, tags: map<str,str>}

@endpoint DELETE /projects/{projectName}/placements/{placementName}
@desc Deletes a placement. To delete a placement, it must not have any devices associated with it.  When you delete a placement, all associated data becomes irretrievable.
@required {placementName: str, projectName: str}

@endpoint DELETE /projects/{projectName}
@desc Deletes a project. To delete a project, it must not have any placements associated with it.  When you delete a project, all associated data becomes irretrievable.
@required {projectName: str}

@endpoint GET /projects/{projectName}/placements/{placementName}
@desc Describes a placement in a project.
@required {placementName: str, projectName: str}
@returns(200) {placement: PlacementDescription{projectName: str, placementName: str, attributes: map<str,str>, createdDate: str(timestamp), updatedDate: str(timestamp)}}

@endpoint GET /projects/{projectName}
@desc Returns an object describing a project.
@required {projectName: str}
@returns(200) {project: ProjectDescription{arn: str?, projectName: str, description: str?, createdDate: str(timestamp), updatedDate: str(timestamp), placementTemplate: PlacementTemplate?{defaultAttributes: map<str,str>?, deviceTemplates: map<str,DeviceTemplate>?}, tags: map<str,str>?}}

@endpoint DELETE /projects/{projectName}/placements/{placementName}/devices/{deviceTemplateName}
@desc Removes a physical device from a placement.
@required {projectName: str, placementName: str, deviceTemplateName: str}

@endpoint GET /projects/{projectName}/placements/{placementName}/devices
@desc Returns an object enumerating the devices in a placement.
@required {projectName: str, placementName: str}
@returns(200) {devices: map<str,str>}

@endpoint GET /projects/{projectName}/placements
@desc Lists the placement(s) of a project.
@required {projectName: str}
@optional {nextToken: str, maxResults: int}
@returns(200) {placements: [PlacementSummary], nextToken: str?}

@endpoint GET /projects
@desc Lists the AWS IoT 1-Click project(s) associated with your AWS account and region.
@optional {nextToken: str, maxResults: int}
@returns(200) {projects: [ProjectSummary], nextToken: str?}

@endgroup

@group tags
@endpoint GET /tags/{resourceArn}
@desc Lists the tags (metadata key/value pairs) which you have assigned to the resource.
@required {resourceArn: str}
@returns(200) {tags: map<str,str>?}

@endpoint POST /tags/{resourceArn}
@desc Creates or modifies tags for a resource. Tags are key/value pairs (metadata) that can be used to manage a resource. For more information, see AWS Tagging Strategies.
@required {resourceArn: str, tags: map<str,str>}

@endpoint DELETE /tags/{resourceArn}
@desc Removes one or more tags (metadata key/value pairs) from a resource.
@required {resourceArn: str, tagKeys: [str]}

@endgroup

@group projects
@endpoint PUT /projects/{projectName}/placements/{placementName}
@desc Updates a placement with the given attributes. To clear an attribute, pass an empty value (i.e., "").
@required {placementName: str, projectName: str}
@optional {attributes: map<str,str>}

@endpoint PUT /projects/{projectName}
@desc Updates a project associated with your AWS account and region. With the exception of device template names, you can pass just the values that need to be updated because the update request will change only the values that are provided. To clear a value, pass the empty string (i.e., "").
@required {projectName: str}
@optional {description: str, placementTemplate: PlacementTemplate}

@endgroup

@end
