Skip to content

Commit

Permalink
Merge pull request #65 from noppoMan/update-models-171204
Browse files Browse the repository at this point in the history
Update models 171204
  • Loading branch information
noppoMan authored Dec 10, 2017
2 parents a675b7a + 1530f7b commit 430bcea
Show file tree
Hide file tree
Showing 569 changed files with 218,335 additions and 49,270 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ install:
- if [[ $OS != "macos" ]]; then docker run -d -p 4569:4569 lphoward/fake-s3; fi

script:
- travis_wait 30 swift build
- travis_wait 40 swift build
- if [[ $OS != "macos" ]]; then swift test; fi
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"repositoryURL": "https://github.com/noppoMan/aws-sdk-swift-core.git",
"state": {
"branch": null,
"revision": "4adb01cf6cac6471783477e1ec8330dbf96ebce1",
"version": "1.0.5"
"revision": "d5182811d91b0870cd4352b0bcf2560bdc509838",
"version": "1.0.6"
}
},
{
Expand Down
109 changes: 109 additions & 0 deletions Sources/AWSSDKSwift/Services/AWSMigrationHub/AWSMigrationHub_API.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/noppoMan/aws-sdk-swift/blob/master/Sources/CodeGenerator/main.swift. DO NOT EDIT.

import Foundation
import AWSSDKSwiftCore

/**

*/
public struct AWSMigrationHub {

let client: AWSClient

public init(accessKeyId: String? = nil, secretAccessKey: String? = nil, region: AWSSDKSwiftCore.Region? = nil, endpoint: String? = nil) {
self.client = AWSClient(
accessKeyId: accessKeyId,
secretAccessKey: secretAccessKey,
region: region,
amzTarget: "AWSMigrationHub",
service: "mgh",
serviceProtocol: ServiceProtocol(type: .json, version: ServiceProtocol.Version(major: 1, minor: 1)),
apiVersion: "2017-05-31",
endpoint: endpoint,
middlewares: [],
possibleErrorTypes: [AWSMigrationHubError.self]
)
}

/// Retrieves a list of all attributes associated with a specific migration task.
public func describeMigrationTask(_ input: DescribeMigrationTaskRequest) throws -> DescribeMigrationTaskResult {
return try client.send(operation: "DescribeMigrationTask", path: "/", httpMethod: "POST", input: input)
}

/// Disassociate an Application Discovery Service (ADS) discovered resource from a migration task.
public func disassociateDiscoveredResource(_ input: DisassociateDiscoveredResourceRequest) throws -> DisassociateDiscoveredResourceResult {
return try client.send(operation: "DisassociateDiscoveredResource", path: "/", httpMethod: "POST", input: input)
}

/// Provides identifying details of the resource being migrated so that it can be associated in the Application Discovery Service (ADS)'s repository. This association occurs asynchronously after PutResourceAttributes returns. Keep in mind that subsequent calls to PutResourceAttributes will override previously stored attributes. For example, if it is first called with a MAC address, but later, it is desired to add an IP address, it will then be required to call it with both the IP and MAC addresses to prevent overiding the MAC address. Because this is an asynchronous call, it will always return 200, whether an association occurs or not. To confirm if an association was found based on the provided details, call ListAssociatedResource.
public func putResourceAttributes(_ input: PutResourceAttributesRequest) throws -> PutResourceAttributesResult {
return try client.send(operation: "PutResourceAttributes", path: "/", httpMethod: "POST", input: input)
}

/// Associates a created artifact of an AWS cloud resource, the target receiving the migration, with the migration task performed by a migration tool. This API has the following traits: Migration tools can call the AssociateCreatedArtifact operation to indicate which AWS artifact is associated with a migration task. The created artifact name must be provided in ARN (Amazon Resource Name) format which will contain information about type and region; for example: arn:aws:ec2:us-east-1:488216288981:image/ami-6d0ba87b. Examples of the AWS resource behind the created artifact are, AMI's, EC2 instance, or DMS endpoint, etc.
public func associateCreatedArtifact(_ input: AssociateCreatedArtifactRequest) throws -> AssociateCreatedArtifactResult {
return try client.send(operation: "AssociateCreatedArtifact", path: "/", httpMethod: "POST", input: input)
}

/// Disassociates a created artifact of an AWS resource with a migration task performed by a migration tool that was previously associated. This API has the following traits: A migration user can call the DisassociateCreatedArtifacts operation to disassociate a created AWS Artifact from a migration task. The created artifact name must be provided in ARN (Amazon Resource Name) format which will contain information about type and region; for example: arn:aws:ec2:us-east-1:488216288981:image/ami-6d0ba87b. Examples of the AWS resource behind the created artifact are, AMI's, EC2 instance, or RDS instance, etc.
public func disassociateCreatedArtifact(_ input: DisassociateCreatedArtifactRequest) throws -> DisassociateCreatedArtifactResult {
return try client.send(operation: "DisassociateCreatedArtifact", path: "/", httpMethod: "POST", input: input)
}

/// Lists the created artifacts attached to a given migration task in an update stream. This API has the following traits: Gets the list of the created artifacts while migration is taking place. Shows the artifacts created by the migration tool that was associated by the AssociateCreatedArtifact API. Lists created artifacts in a paginated interface.
public func listCreatedArtifacts(_ input: ListCreatedArtifactsRequest) throws -> ListCreatedArtifactsResult {
return try client.send(operation: "ListCreatedArtifacts", path: "/", httpMethod: "POST", input: input)
}

/// Notifies Migration Hub of the current status, progress, or other detail regarding a migration task. This API has the following traits: Migration tools will call the NotifyMigrationTaskState API to share the latest progress and status. MigrationTaskName is used for addressing updates to the correct target. ProgressUpdateStream is used for access control and to provide a namespace for each migration tool.
public func notifyMigrationTaskState(_ input: NotifyMigrationTaskStateRequest) throws -> NotifyMigrationTaskStateResult {
return try client.send(operation: "NotifyMigrationTaskState", path: "/", httpMethod: "POST", input: input)
}

/// Deletes a progress update stream, including all of its tasks, which was previously created as an AWS resource used for access control. This API has the following traits: The only parameter needed for DeleteProgressUpdateStream is the stream name (same as a CreateProgressUpdateStream call). The call will return, and a background process will asynchronously be doing the actual delete of the stream and all of its resources (tasks, associated resources, resource attributes, created artifacts). If the stream takes time to be deleted, it might still show up on a ListProgressUpdateStreams call. CreateProgressUpdateStream, ImportMigrationTask, NotifyMigrationTaskState, and all Associate[*] APIs realted to the tasks belonging to the stream will throw "InvalidInputException" if the stream of the same name is in the process of being deleted. Once the stream and all of its resources are deleted, CreateProgressUpdateStream for a stream of the same name will succeed, and that stream will be an entirely new logical resource (without any resources associated with the old stream).
public func deleteProgressUpdateStream(_ input: DeleteProgressUpdateStreamRequest) throws -> DeleteProgressUpdateStreamResult {
return try client.send(operation: "DeleteProgressUpdateStream", path: "/", httpMethod: "POST", input: input)
}

/// Lists all, or filtered by resource name, migration tasks associated with the user account making this call. This API has the following traits: Can show a summary list of the most recent migration tasks. Can show a summary list of migration tasks associated with a given discovered resource. Lists migration tasks in a paginated interface.
public func listMigrationTasks(_ input: ListMigrationTasksRequest) throws -> ListMigrationTasksResult {
return try client.send(operation: "ListMigrationTasks", path: "/", httpMethod: "POST", input: input)
}

/// Associates a discovered resource ID from Application Discovery Service (ADS) with a migration task.
public func associateDiscoveredResource(_ input: AssociateDiscoveredResourceRequest) throws -> AssociateDiscoveredResourceResult {
return try client.send(operation: "AssociateDiscoveredResource", path: "/", httpMethod: "POST", input: input)
}

/// Gets the migration status of an application.
public func describeApplicationState(_ input: DescribeApplicationStateRequest) throws -> DescribeApplicationStateResult {
return try client.send(operation: "DescribeApplicationState", path: "/", httpMethod: "POST", input: input)
}

/// Registers a new migration task which represents a server, database, etc., being migrated to AWS by a migration tool. This API is a prerequisite to calling the NotifyMigrationTaskState API as the migration tool must first register the migration task with Migration Hub.
public func importMigrationTask(_ input: ImportMigrationTaskRequest) throws -> ImportMigrationTaskResult {
return try client.send(operation: "ImportMigrationTask", path: "/", httpMethod: "POST", input: input)
}

/// Creates a progress update stream which is an AWS resource used for access control as well as a namespace for migration task names that is implicitly linked to your AWS account. It must uniquely identify the migration tool as it is used for all updates made by the tool; however, it does not need to be unique for each AWS account because it is scoped to the AWS account.
public func createProgressUpdateStream(_ input: CreateProgressUpdateStreamRequest) throws -> CreateProgressUpdateStreamResult {
return try client.send(operation: "CreateProgressUpdateStream", path: "/", httpMethod: "POST", input: input)
}

/// Lists progress update streams associated with the user account making this call.
public func listProgressUpdateStreams(_ input: ListProgressUpdateStreamsRequest) throws -> ListProgressUpdateStreamsResult {
return try client.send(operation: "ListProgressUpdateStreams", path: "/", httpMethod: "POST", input: input)
}

/// Lists discovered resources associated with the given MigrationTask.
public func listDiscoveredResources(_ input: ListDiscoveredResourcesRequest) throws -> ListDiscoveredResourcesResult {
return try client.send(operation: "ListDiscoveredResources", path: "/", httpMethod: "POST", input: input)
}

/// Sets the migration state of an application. For a given application identified by the value passed to ApplicationId, its status is set or updated by passing one of three values to Status: NOT_STARTED | IN_PROGRESS | COMPLETED.
public func notifyApplicationState(_ input: NotifyApplicationStateRequest) throws -> NotifyApplicationStateResult {
return try client.send(operation: "NotifyApplicationState", path: "/", httpMethod: "POST", input: input)
}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/noppoMan/aws-sdk-swift/blob/master/Sources/CodeGenerator/main.swift. DO NOT EDIT.

import AWSSDKSwiftCore

/// Error enum for AWSMigrationHub
public enum AWSMigrationHubError: AWSErrorType {
case accessDeniedException(message: String?)
case internalServerError(message: String?)
case serviceUnavailableException(message: String?)
case invalidInputException(message: String?)
case resourceNotFoundException(message: String?)
case dryRunOperation(message: String?)
case unauthorizedOperation(message: String?)
case policyErrorException(message: String?)
}

extension AWSMigrationHubError {
public init?(errorCode: String, message: String?){
var errorCode = errorCode
if let index = errorCode.index(of: "#") {
errorCode = String(errorCode[errorCode.index(index, offsetBy: 1)...])
}
switch errorCode {
case "AccessDeniedException":
self = .accessDeniedException(message: message)
case "InternalServerError":
self = .internalServerError(message: message)
case "ServiceUnavailableException":
self = .serviceUnavailableException(message: message)
case "InvalidInputException":
self = .invalidInputException(message: message)
case "ResourceNotFoundException":
self = .resourceNotFoundException(message: message)
case "DryRunOperation":
self = .dryRunOperation(message: message)
case "UnauthorizedOperation":
self = .unauthorizedOperation(message: message)
case "PolicyErrorException":
self = .policyErrorException(message: message)
default:
return nil
}
}
}
Loading

0 comments on commit 430bcea

Please sign in to comment.