Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Latest commit

 

History

History
396 lines (264 loc) · 13 KB

AWSAPI.md

File metadata and controls

396 lines (264 loc) · 13 KB

AWSAPI

All URIs are relative to https://elements.local

Method HTTP request Description
createAWSAccount POST /api/2/aws-accounts
deleteAWSAccount DELETE /api/2/aws-accounts/{id}
getAWSAccount GET /api/2/aws-accounts/{id}
getAWSAccountSNSTopics GET /api/2/aws-accounts/{id}/sns/topics
getAllAWSAccounts GET /api/2/aws-accounts
patchAWSAccount PATCH /api/2/aws-accounts/{id}
testAWSAccountCredentials POST /api/2/aws-accounts/test-credentials
updateAWSAccount PUT /api/2/aws-accounts/{id}

createAWSAccount

    open class func createAWSAccount( cloudAccountMiniUpdate: CloudAccountMiniUpdate) -> Promise<CloudAccountMini>

Required permissions * User account permission: tasks:manage (read) / system:admin-access (write)

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK

let cloudAccountMiniUpdate = CloudAccountMiniUpdate(provider: "provider_example", name: "name_example") // CloudAccountMiniUpdate | 

AWSAPI.createAWSAccount(cloudAccountMiniUpdate: cloudAccountMiniUpdate).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
cloudAccountMiniUpdate CloudAccountMiniUpdate

Return type

CloudAccountMini

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteAWSAccount

    open class func deleteAWSAccount( id: Int) -> Promise<Void>

Required permissions * User account permission: tasks:manage (read) / system:admin-access (write)

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK

let id = 987 // Int | A unique integer value identifying this cloud account.

AWSAPI.deleteAWSAccount(id: id).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
id Int A unique integer value identifying this cloud account.

Return type

Void (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getAWSAccount

    open class func getAWSAccount( id: Int) -> Promise<CloudAccountMini>

Required permissions * User account permission: tasks:manage (read) / system:admin-access (write)

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK

let id = 987 // Int | A unique integer value identifying this cloud account.

AWSAPI.getAWSAccount(id: id).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
id Int A unique integer value identifying this cloud account.

Return type

CloudAccountMini

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getAWSAccountSNSTopics

    open class func getAWSAccountSNSTopics( id: Int) -> Promise<ListTopics>

Required permissions * User account permission: tasks:manage (read) / system:admin-access (write)

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK

let id = 987 // Int | A unique integer value identifying this cloud account.

AWSAPI.getAWSAccountSNSTopics(id: id).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
id Int A unique integer value identifying this cloud account.

Return type

ListTopics

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getAllAWSAccounts

    open class func getAllAWSAccounts( name: String? = nil,  id: Double? = nil,  ordering: String? = nil,  limit: Int? = nil,  offset: Int? = nil) -> Promise<[CloudAccountMini]>

Required permissions * User account permission: tasks:manage (read) / system:admin-access (write)

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK

let name = "name_example" // String | Filter the returned list by `name`. (optional)
let id = 987 // Double | Filter the returned list by `id`. (optional)
let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional)
let limit = 987 // Int | Number of results to return per page. (optional)
let offset = 987 // Int | The initial index from which to return the results. (optional)

AWSAPI.getAllAWSAccounts(name: name, id: id, ordering: ordering, limit: limit, offset: offset).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
name String Filter the returned list by `name`. [optional]
id Double Filter the returned list by `id`. [optional]
ordering String Which field to use when ordering the results. [optional]
limit Int Number of results to return per page. [optional]
offset Int The initial index from which to return the results. [optional]

Return type

[CloudAccountMini]

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

patchAWSAccount

    open class func patchAWSAccount( id: Int,  cloudAccountMiniPartialUpdate: CloudAccountMiniPartialUpdate) -> Promise<CloudAccountMini>

Required permissions * User account permission: tasks:manage (read) / system:admin-access (write)

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK

let id = 987 // Int | A unique integer value identifying this cloud account.
let cloudAccountMiniPartialUpdate = CloudAccountMiniPartialUpdate(provider: "provider_example", name: "name_example") // CloudAccountMiniPartialUpdate | 

AWSAPI.patchAWSAccount(id: id, cloudAccountMiniPartialUpdate: cloudAccountMiniPartialUpdate).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
id Int A unique integer value identifying this cloud account.
cloudAccountMiniPartialUpdate CloudAccountMiniPartialUpdate

Return type

CloudAccountMini

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

testAWSAccountCredentials

    open class func testAWSAccountCredentials( testAWSCredentialsRequest: TestAWSCredentialsRequest) -> Promise<TestAWSCredentialsResponse>

Required permissions * User account permission: tasks:manage (read) / system:admin-access (write)

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK

let testAWSCredentialsRequest = TestAWSCredentialsRequest(accessKeyId: "accessKeyId_example", secretAccessKey: "secretAccessKey_example") // TestAWSCredentialsRequest | 

AWSAPI.testAWSAccountCredentials(testAWSCredentialsRequest: testAWSCredentialsRequest).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
testAWSCredentialsRequest TestAWSCredentialsRequest

Return type

TestAWSCredentialsResponse

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateAWSAccount

    open class func updateAWSAccount( id: Int,  cloudAccountMiniUpdate: CloudAccountMiniUpdate) -> Promise<CloudAccountMini>

Required permissions * User account permission: tasks:manage (read) / system:admin-access (write)

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK

let id = 987 // Int | A unique integer value identifying this cloud account.
let cloudAccountMiniUpdate = CloudAccountMiniUpdate(provider: "provider_example", name: "name_example") // CloudAccountMiniUpdate | 

AWSAPI.updateAWSAccount(id: id, cloudAccountMiniUpdate: cloudAccountMiniUpdate).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
id Int A unique integer value identifying this cloud account.
cloudAccountMiniUpdate CloudAccountMiniUpdate

Return type

CloudAccountMini

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]