diff --git a/apis/grafana/2020-08-18/api-2.json b/apis/grafana/2020-08-18/api-2.json index 7a6114e7d65..66a41abb4d2 100644 --- a/apis/grafana/2020-08-18/api-2.json +++ b/apis/grafana/2020-08-18/api-2.json @@ -48,6 +48,25 @@ ], "idempotent":true }, + "CreateWorkspaceApiKey":{ + "name":"CreateWorkspaceApiKey", + "http":{ + "method":"POST", + "requestUri":"/workspaces/{workspaceId}/apikeys", + "responseCode":200 + }, + "input":{"shape":"CreateWorkspaceApiKeyRequest"}, + "output":{"shape":"CreateWorkspaceApiKeyResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"ThrottlingException"}, + {"shape":"ConflictException"}, + {"shape":"ValidationException"}, + {"shape":"AccessDeniedException"}, + {"shape":"InternalServerException"}, + {"shape":"ServiceQuotaExceededException"} + ] + }, "DeleteWorkspace":{ "name":"DeleteWorkspace", "http":{ @@ -67,6 +86,24 @@ ], "idempotent":true }, + "DeleteWorkspaceApiKey":{ + "name":"DeleteWorkspaceApiKey", + "http":{ + "method":"DELETE", + "requestUri":"/workspaces/{workspaceId}/apikeys/{keyName}", + "responseCode":200 + }, + "input":{"shape":"DeleteWorkspaceApiKeyRequest"}, + "output":{"shape":"DeleteWorkspaceApiKeyResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"ThrottlingException"}, + {"shape":"ConflictException"}, + {"shape":"ValidationException"}, + {"shape":"AccessDeniedException"}, + {"shape":"InternalServerException"} + ] + }, "DescribeWorkspace":{ "name":"DescribeWorkspace", "http":{ @@ -285,6 +322,15 @@ "type":"list", "member":{"shape":"AllowedOrganization"} }, + "ApiKeyName":{ + "type":"string", + "max":100, + "min":1 + }, + "ApiKeyToken":{ + "type":"string", + "sensitive":true + }, "AssertionAttribute":{ "type":"string", "max":256, @@ -387,6 +433,44 @@ }, "exception":true }, + "CreateWorkspaceApiKeyRequest":{ + "type":"structure", + "required":[ + "keyName", + "keyRole", + "secondsToLive", + "workspaceId" + ], + "members":{ + "keyName":{"shape":"ApiKeyName"}, + "keyRole":{"shape":"String"}, + "secondsToLive":{"shape":"CreateWorkspaceApiKeyRequestSecondsToLiveInteger"}, + "workspaceId":{ + "shape":"WorkspaceId", + "location":"uri", + "locationName":"workspaceId" + } + } + }, + "CreateWorkspaceApiKeyRequestSecondsToLiveInteger":{ + "type":"integer", + "box":true, + "max":2592000, + "min":1 + }, + "CreateWorkspaceApiKeyResponse":{ + "type":"structure", + "required":[ + "key", + "keyName", + "workspaceId" + ], + "members":{ + "key":{"shape":"ApiKeyToken"}, + "keyName":{"shape":"ApiKeyName"}, + "workspaceId":{"shape":"WorkspaceId"} + } + }, "CreateWorkspaceRequest":{ "type":"structure", "required":[ @@ -437,6 +521,36 @@ "type":"list", "member":{"shape":"DataSourceType"} }, + "DeleteWorkspaceApiKeyRequest":{ + "type":"structure", + "required":[ + "keyName", + "workspaceId" + ], + "members":{ + "keyName":{ + "shape":"ApiKeyName", + "location":"uri", + "locationName":"keyName" + }, + "workspaceId":{ + "shape":"WorkspaceId", + "location":"uri", + "locationName":"workspaceId" + } + } + }, + "DeleteWorkspaceApiKeyResponse":{ + "type":"structure", + "required":[ + "keyName", + "workspaceId" + ], + "members":{ + "keyName":{"shape":"ApiKeyName"}, + "workspaceId":{"shape":"WorkspaceId"} + } + }, "DeleteWorkspaceRequest":{ "type":"structure", "required":["workspaceId"], @@ -741,7 +855,8 @@ "type":"string", "enum":[ "ADMIN", - "EDITOR" + "EDITOR", + "VIEWER" ] }, "RoleValue":{ diff --git a/apis/grafana/2020-08-18/docs-2.json b/apis/grafana/2020-08-18/docs-2.json index e228fb9979b..c34344ec37c 100644 --- a/apis/grafana/2020-08-18/docs-2.json +++ b/apis/grafana/2020-08-18/docs-2.json @@ -4,7 +4,9 @@ "operations": { "AssociateLicense": "

Assigns a Grafana Enterprise license to a workspace. Upgrading to Grafana Enterprise incurs additional fees. For more information, see Upgrade a workspace to Grafana Enterprise.

", "CreateWorkspace": "

Creates a workspace. In a workspace, you can create Grafana dashboards and visualizations to analyze your metrics, logs, and traces. You don't have to build, package, or deploy any hardware to run the Grafana server.

Don't use CreateWorkspace to modify an existing workspace. Instead, use UpdateWorkspace.

", + "CreateWorkspaceApiKey": "

Creates an API key for the workspace. This key can be used to authenticate requests sent to the workspace's HTTP API. See https://docs.aws.amazon.com/grafana/latest/userguide/Using-Grafana-APIs.html for available APIs and example requests.

", "DeleteWorkspace": "

Deletes an Amazon Managed Grafana workspace.

", + "DeleteWorkspaceApiKey": "

Deletes an API key for a workspace.

", "DescribeWorkspace": "

Displays information about one Amazon Managed Grafana workspace.

", "DescribeWorkspaceAuthentication": "

Displays information about the authentication methods used in one Amazon Managed Grafana workspace.

", "DisassociateLicense": "

Removes the Grafana Enterprise license from a workspace.

", @@ -43,6 +45,21 @@ "SamlConfiguration$allowedOrganizations": "

Lists which organizations defined in the SAML assertion are allowed to use the Amazon Managed Grafana workspace. If this is empty, all organizations in the assertion attribute have access.

" } }, + "ApiKeyName": { + "base": null, + "refs": { + "CreateWorkspaceApiKeyRequest$keyName": "

Specifies the name of the key to create. Key names must be unique to the workspace.

", + "CreateWorkspaceApiKeyResponse$keyName": "

The name of the key that was created.

", + "DeleteWorkspaceApiKeyRequest$keyName": "

The name of the API key to delete.

", + "DeleteWorkspaceApiKeyResponse$keyName": "

The name of the API key that was deleted.

" + } + }, + "ApiKeyToken": { + "base": null, + "refs": { + "CreateWorkspaceApiKeyResponse$key": "

The key token that was created. Use this value as a bearer token to authenticate HTTP requests to the workspace.

" + } + }, "AssertionAttribute": { "base": null, "refs": { @@ -122,6 +139,22 @@ "refs": { } }, + "CreateWorkspaceApiKeyRequest": { + "base": null, + "refs": { + } + }, + "CreateWorkspaceApiKeyRequestSecondsToLiveInteger": { + "base": null, + "refs": { + "CreateWorkspaceApiKeyRequest$secondsToLive": "

Specifies the time in seconds until the key expires. Keys can be valid for up to 30 days.

" + } + }, + "CreateWorkspaceApiKeyResponse": { + "base": null, + "refs": { + } + }, "CreateWorkspaceRequest": { "base": null, "refs": { @@ -146,6 +179,16 @@ "WorkspaceDescription$dataSources": "

Specifies the Amazon Web Services data sources that have been configured to have IAM roles and permissions created to allow Amazon Managed Grafana to read data from these sources.

" } }, + "DeleteWorkspaceApiKeyRequest": { + "base": null, + "refs": { + } + }, + "DeleteWorkspaceApiKeyResponse": { + "base": null, + "refs": { + } + }, "DeleteWorkspaceRequest": { "base": null, "refs": { @@ -448,6 +491,7 @@ "ConflictException$message": "

A description of the error.

", "ConflictException$resourceId": "

The ID of the resource that is associated with the error.

", "ConflictException$resourceType": "

The type of the resource that is associated with the error.

", + "CreateWorkspaceApiKeyRequest$keyRole": "

Specifies the permission level of the key.

Valid Values: VIEWER | EDITOR | ADMIN

", "IdpMetadata$xml": "

The actual full metadata file, in XML format.

", "InternalServerException$message": "

A description of the error.

", "ListTagsForResourceRequest$resourceArn": "

The ARN of the resource the list of tags are associated with.

", @@ -660,6 +704,10 @@ "base": null, "refs": { "AssociateLicenseRequest$workspaceId": "

The ID of the workspace to associate the license with.

", + "CreateWorkspaceApiKeyRequest$workspaceId": "

The ID of the workspace in which to create an API key.

", + "CreateWorkspaceApiKeyResponse$workspaceId": "

The ID of the workspace that the key is valid for.

", + "DeleteWorkspaceApiKeyRequest$workspaceId": "

The ID of the workspace to delete.

", + "DeleteWorkspaceApiKeyResponse$workspaceId": "

The ID of the workspace where the key was deleted.

", "DeleteWorkspaceRequest$workspaceId": "

The ID of the workspace to delete.

", "DescribeWorkspaceAuthenticationRequest$workspaceId": "

The ID of the workspace to return authentication information about.

", "DescribeWorkspaceRequest$workspaceId": "

The ID of the workspace to display information about.

", diff --git a/gems/aws-sdk-managedgrafana/CHANGELOG.md b/gems/aws-sdk-managedgrafana/CHANGELOG.md index d257e180d46..1d2d89c144d 100644 --- a/gems/aws-sdk-managedgrafana/CHANGELOG.md +++ b/gems/aws-sdk-managedgrafana/CHANGELOG.md @@ -1,6 +1,11 @@ Unreleased Changes ------------------ +1.8.0 (2022-05-13) +------------------ + +* Feature - This release adds APIs for creating and deleting API keys in an Amazon Managed Grafana workspace. + 1.7.0 (2022-03-31) ------------------ diff --git a/gems/aws-sdk-managedgrafana/VERSION b/gems/aws-sdk-managedgrafana/VERSION index bd8bf882d06..27f9cd322bb 100644 --- a/gems/aws-sdk-managedgrafana/VERSION +++ b/gems/aws-sdk-managedgrafana/VERSION @@ -1 +1 @@ -1.7.0 +1.8.0 diff --git a/gems/aws-sdk-managedgrafana/lib/aws-sdk-managedgrafana.rb b/gems/aws-sdk-managedgrafana/lib/aws-sdk-managedgrafana.rb index 3a1b7ad7ff8..d620b805b7f 100644 --- a/gems/aws-sdk-managedgrafana/lib/aws-sdk-managedgrafana.rb +++ b/gems/aws-sdk-managedgrafana/lib/aws-sdk-managedgrafana.rb @@ -48,6 +48,6 @@ # @!group service module Aws::ManagedGrafana - GEM_VERSION = '1.7.0' + GEM_VERSION = '1.8.0' end diff --git a/gems/aws-sdk-managedgrafana/lib/aws-sdk-managedgrafana/client.rb b/gems/aws-sdk-managedgrafana/lib/aws-sdk-managedgrafana/client.rb index 7e886e3139d..3ed17a266c5 100644 --- a/gems/aws-sdk-managedgrafana/lib/aws-sdk-managedgrafana/client.rb +++ b/gems/aws-sdk-managedgrafana/lib/aws-sdk-managedgrafana/client.rb @@ -588,6 +588,58 @@ def create_workspace(params = {}, options = {}) req.send_request(options) end + # Creates an API key for the workspace. This key can be used to + # authenticate requests sent to the workspace's HTTP API. See [ + # https://docs.aws.amazon.com/grafana/latest/userguide/Using-Grafana-APIs.html]( + # https://docs.aws.amazon.com/grafana/latest/userguide/Using-Grafana-APIs.html) + # for available APIs and example requests. + # + # @option params [required, String] :key_name + # Specifies the name of the key to create. Key names must be unique to + # the workspace. + # + # @option params [required, String] :key_role + # Specifies the permission level of the key. + # + # Valid Values: `VIEWER` \| `EDITOR` \| `ADMIN` + # + # @option params [required, Integer] :seconds_to_live + # Specifies the time in seconds until the key expires. Keys can be valid + # for up to 30 days. + # + # @option params [required, String] :workspace_id + # The ID of the workspace in which to create an API key. + # + # @return [Types::CreateWorkspaceApiKeyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::CreateWorkspaceApiKeyResponse#key #key} => String + # * {Types::CreateWorkspaceApiKeyResponse#key_name #key_name} => String + # * {Types::CreateWorkspaceApiKeyResponse#workspace_id #workspace_id} => String + # + # @example Request syntax with placeholder values + # + # resp = client.create_workspace_api_key({ + # key_name: "ApiKeyName", # required + # key_role: "String", # required + # seconds_to_live: 1, # required + # workspace_id: "WorkspaceId", # required + # }) + # + # @example Response structure + # + # resp.key #=> String + # resp.key_name #=> String + # resp.workspace_id #=> String + # + # @see http://docs.aws.amazon.com/goto/WebAPI/grafana-2020-08-18/CreateWorkspaceApiKey AWS API Documentation + # + # @overload create_workspace_api_key(params = {}) + # @param [Hash] params ({}) + def create_workspace_api_key(params = {}, options = {}) + req = build_request(:create_workspace_api_key, params) + req.send_request(options) + end + # Deletes an Amazon Managed Grafana workspace. # # @option params [required, String] :workspace_id @@ -643,6 +695,40 @@ def delete_workspace(params = {}, options = {}) req.send_request(options) end + # Deletes an API key for a workspace. + # + # @option params [required, String] :key_name + # The name of the API key to delete. + # + # @option params [required, String] :workspace_id + # The ID of the workspace to delete. + # + # @return [Types::DeleteWorkspaceApiKeyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::DeleteWorkspaceApiKeyResponse#key_name #key_name} => String + # * {Types::DeleteWorkspaceApiKeyResponse#workspace_id #workspace_id} => String + # + # @example Request syntax with placeholder values + # + # resp = client.delete_workspace_api_key({ + # key_name: "ApiKeyName", # required + # workspace_id: "WorkspaceId", # required + # }) + # + # @example Response structure + # + # resp.key_name #=> String + # resp.workspace_id #=> String + # + # @see http://docs.aws.amazon.com/goto/WebAPI/grafana-2020-08-18/DeleteWorkspaceApiKey AWS API Documentation + # + # @overload delete_workspace_api_key(params = {}) + # @param [Hash] params ({}) + def delete_workspace_api_key(params = {}, options = {}) + req = build_request(:delete_workspace_api_key, params) + req.send_request(options) + end + # Displays information about one Amazon Managed Grafana workspace. # # @option params [required, String] :workspace_id @@ -856,7 +942,7 @@ def disassociate_license(params = {}, options = {}) # # resp.next_token #=> String # resp.permissions #=> Array - # resp.permissions[0].role #=> String, one of "ADMIN", "EDITOR" + # resp.permissions[0].role #=> String, one of "ADMIN", "EDITOR", "VIEWER" # resp.permissions[0].user.id #=> String # resp.permissions[0].user.type #=> String, one of "SSO_USER", "SSO_GROUP" # @@ -1042,7 +1128,7 @@ def untag_resource(params = {}, options = {}) # update_instruction_batch: [ # required # { # action: "ADD", # required, accepts ADD, REVOKE - # role: "ADMIN", # required, accepts ADMIN, EDITOR + # role: "ADMIN", # required, accepts ADMIN, EDITOR, VIEWER # users: [ # required # { # id: "SsoId", # required @@ -1058,7 +1144,7 @@ def untag_resource(params = {}, options = {}) # # resp.errors #=> Array # resp.errors[0].caused_by.action #=> String, one of "ADD", "REVOKE" - # resp.errors[0].caused_by.role #=> String, one of "ADMIN", "EDITOR" + # resp.errors[0].caused_by.role #=> String, one of "ADMIN", "EDITOR", "VIEWER" # resp.errors[0].caused_by.users #=> Array # resp.errors[0].caused_by.users[0].id #=> String # resp.errors[0].caused_by.users[0].type #=> String, one of "SSO_USER", "SSO_GROUP" @@ -1327,7 +1413,7 @@ def build_request(operation_name, params = {}) params: params, config: config) context[:gem_name] = 'aws-sdk-managedgrafana' - context[:gem_version] = '1.7.0' + context[:gem_version] = '1.8.0' Seahorse::Client::Request.new(handlers, context) end diff --git a/gems/aws-sdk-managedgrafana/lib/aws-sdk-managedgrafana/client_api.rb b/gems/aws-sdk-managedgrafana/lib/aws-sdk-managedgrafana/client_api.rb index c03513918fa..ff13fa5e369 100644 --- a/gems/aws-sdk-managedgrafana/lib/aws-sdk-managedgrafana/client_api.rb +++ b/gems/aws-sdk-managedgrafana/lib/aws-sdk-managedgrafana/client_api.rb @@ -17,6 +17,8 @@ module ClientApi AccountAccessType = Shapes::StringShape.new(name: 'AccountAccessType') AllowedOrganization = Shapes::StringShape.new(name: 'AllowedOrganization') AllowedOrganizations = Shapes::ListShape.new(name: 'AllowedOrganizations') + ApiKeyName = Shapes::StringShape.new(name: 'ApiKeyName') + ApiKeyToken = Shapes::StringShape.new(name: 'ApiKeyToken') AssertionAttribute = Shapes::StringShape.new(name: 'AssertionAttribute') AssertionAttributes = Shapes::StructureShape.new(name: 'AssertionAttributes') AssociateLicenseRequest = Shapes::StructureShape.new(name: 'AssociateLicenseRequest') @@ -29,10 +31,15 @@ module ClientApi Boolean = Shapes::BooleanShape.new(name: 'Boolean') ClientToken = Shapes::StringShape.new(name: 'ClientToken') ConflictException = Shapes::StructureShape.new(name: 'ConflictException') + CreateWorkspaceApiKeyRequest = Shapes::StructureShape.new(name: 'CreateWorkspaceApiKeyRequest') + CreateWorkspaceApiKeyRequestSecondsToLiveInteger = Shapes::IntegerShape.new(name: 'CreateWorkspaceApiKeyRequestSecondsToLiveInteger') + CreateWorkspaceApiKeyResponse = Shapes::StructureShape.new(name: 'CreateWorkspaceApiKeyResponse') CreateWorkspaceRequest = Shapes::StructureShape.new(name: 'CreateWorkspaceRequest') CreateWorkspaceResponse = Shapes::StructureShape.new(name: 'CreateWorkspaceResponse') DataSourceType = Shapes::StringShape.new(name: 'DataSourceType') DataSourceTypesList = Shapes::ListShape.new(name: 'DataSourceTypesList') + DeleteWorkspaceApiKeyRequest = Shapes::StructureShape.new(name: 'DeleteWorkspaceApiKeyRequest') + DeleteWorkspaceApiKeyResponse = Shapes::StructureShape.new(name: 'DeleteWorkspaceApiKeyResponse') DeleteWorkspaceRequest = Shapes::StructureShape.new(name: 'DeleteWorkspaceRequest') DeleteWorkspaceResponse = Shapes::StructureShape.new(name: 'DeleteWorkspaceResponse') DescribeWorkspaceAuthenticationRequest = Shapes::StructureShape.new(name: 'DescribeWorkspaceAuthenticationRequest') @@ -156,6 +163,17 @@ module ClientApi ConflictException.add_member(:resource_type, Shapes::ShapeRef.new(shape: String, required: true, location_name: "resourceType")) ConflictException.struct_class = Types::ConflictException + CreateWorkspaceApiKeyRequest.add_member(:key_name, Shapes::ShapeRef.new(shape: ApiKeyName, required: true, location_name: "keyName")) + CreateWorkspaceApiKeyRequest.add_member(:key_role, Shapes::ShapeRef.new(shape: String, required: true, location_name: "keyRole")) + CreateWorkspaceApiKeyRequest.add_member(:seconds_to_live, Shapes::ShapeRef.new(shape: CreateWorkspaceApiKeyRequestSecondsToLiveInteger, required: true, location_name: "secondsToLive")) + CreateWorkspaceApiKeyRequest.add_member(:workspace_id, Shapes::ShapeRef.new(shape: WorkspaceId, required: true, location: "uri", location_name: "workspaceId")) + CreateWorkspaceApiKeyRequest.struct_class = Types::CreateWorkspaceApiKeyRequest + + CreateWorkspaceApiKeyResponse.add_member(:key, Shapes::ShapeRef.new(shape: ApiKeyToken, required: true, location_name: "key")) + CreateWorkspaceApiKeyResponse.add_member(:key_name, Shapes::ShapeRef.new(shape: ApiKeyName, required: true, location_name: "keyName")) + CreateWorkspaceApiKeyResponse.add_member(:workspace_id, Shapes::ShapeRef.new(shape: WorkspaceId, required: true, location_name: "workspaceId")) + CreateWorkspaceApiKeyResponse.struct_class = Types::CreateWorkspaceApiKeyResponse + CreateWorkspaceRequest.add_member(:account_access_type, Shapes::ShapeRef.new(shape: AccountAccessType, required: true, location_name: "accountAccessType")) CreateWorkspaceRequest.add_member(:authentication_providers, Shapes::ShapeRef.new(shape: AuthenticationProviders, required: true, location_name: "authenticationProviders")) CreateWorkspaceRequest.add_member(:client_token, Shapes::ShapeRef.new(shape: ClientToken, location_name: "clientToken", metadata: {"idempotencyToken"=>true})) @@ -176,6 +194,14 @@ module ClientApi DataSourceTypesList.member = Shapes::ShapeRef.new(shape: DataSourceType) + DeleteWorkspaceApiKeyRequest.add_member(:key_name, Shapes::ShapeRef.new(shape: ApiKeyName, required: true, location: "uri", location_name: "keyName")) + DeleteWorkspaceApiKeyRequest.add_member(:workspace_id, Shapes::ShapeRef.new(shape: WorkspaceId, required: true, location: "uri", location_name: "workspaceId")) + DeleteWorkspaceApiKeyRequest.struct_class = Types::DeleteWorkspaceApiKeyRequest + + DeleteWorkspaceApiKeyResponse.add_member(:key_name, Shapes::ShapeRef.new(shape: ApiKeyName, required: true, location_name: "keyName")) + DeleteWorkspaceApiKeyResponse.add_member(:workspace_id, Shapes::ShapeRef.new(shape: WorkspaceId, required: true, location_name: "workspaceId")) + DeleteWorkspaceApiKeyResponse.struct_class = Types::DeleteWorkspaceApiKeyResponse + DeleteWorkspaceRequest.add_member(:workspace_id, Shapes::ShapeRef.new(shape: WorkspaceId, required: true, location: "uri", location_name: "workspaceId")) DeleteWorkspaceRequest.struct_class = Types::DeleteWorkspaceRequest @@ -447,6 +473,21 @@ module ClientApi o.errors << Shapes::ShapeRef.new(shape: ServiceQuotaExceededException) end) + api.add_operation(:create_workspace_api_key, Seahorse::Model::Operation.new.tap do |o| + o.name = "CreateWorkspaceApiKey" + o.http_method = "POST" + o.http_request_uri = "/workspaces/{workspaceId}/apikeys" + o.input = Shapes::ShapeRef.new(shape: CreateWorkspaceApiKeyRequest) + o.output = Shapes::ShapeRef.new(shape: CreateWorkspaceApiKeyResponse) + o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException) + o.errors << Shapes::ShapeRef.new(shape: ThrottlingException) + o.errors << Shapes::ShapeRef.new(shape: ConflictException) + o.errors << Shapes::ShapeRef.new(shape: ValidationException) + o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException) + o.errors << Shapes::ShapeRef.new(shape: InternalServerException) + o.errors << Shapes::ShapeRef.new(shape: ServiceQuotaExceededException) + end) + api.add_operation(:delete_workspace, Seahorse::Model::Operation.new.tap do |o| o.name = "DeleteWorkspace" o.http_method = "DELETE" @@ -461,6 +502,20 @@ module ClientApi o.errors << Shapes::ShapeRef.new(shape: InternalServerException) end) + api.add_operation(:delete_workspace_api_key, Seahorse::Model::Operation.new.tap do |o| + o.name = "DeleteWorkspaceApiKey" + o.http_method = "DELETE" + o.http_request_uri = "/workspaces/{workspaceId}/apikeys/{keyName}" + o.input = Shapes::ShapeRef.new(shape: DeleteWorkspaceApiKeyRequest) + o.output = Shapes::ShapeRef.new(shape: DeleteWorkspaceApiKeyResponse) + o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException) + o.errors << Shapes::ShapeRef.new(shape: ThrottlingException) + o.errors << Shapes::ShapeRef.new(shape: ConflictException) + o.errors << Shapes::ShapeRef.new(shape: ValidationException) + o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException) + o.errors << Shapes::ShapeRef.new(shape: InternalServerException) + end) + api.add_operation(:describe_workspace, Seahorse::Model::Operation.new.tap do |o| o.name = "DescribeWorkspace" o.http_method = "GET" diff --git a/gems/aws-sdk-managedgrafana/lib/aws-sdk-managedgrafana/types.rb b/gems/aws-sdk-managedgrafana/lib/aws-sdk-managedgrafana/types.rb index fa036e08794..6de62e33711 100644 --- a/gems/aws-sdk-managedgrafana/lib/aws-sdk-managedgrafana/types.rb +++ b/gems/aws-sdk-managedgrafana/lib/aws-sdk-managedgrafana/types.rb @@ -213,6 +213,70 @@ class ConflictException < Struct.new( include Aws::Structure end + # @note When making an API call, you may pass CreateWorkspaceApiKeyRequest + # data as a hash: + # + # { + # key_name: "ApiKeyName", # required + # key_role: "String", # required + # seconds_to_live: 1, # required + # workspace_id: "WorkspaceId", # required + # } + # + # @!attribute [rw] key_name + # Specifies the name of the key to create. Key names must be unique to + # the workspace. + # @return [String] + # + # @!attribute [rw] key_role + # Specifies the permission level of the key. + # + # Valid Values: `VIEWER` \| `EDITOR` \| `ADMIN` + # @return [String] + # + # @!attribute [rw] seconds_to_live + # Specifies the time in seconds until the key expires. Keys can be + # valid for up to 30 days. + # @return [Integer] + # + # @!attribute [rw] workspace_id + # The ID of the workspace in which to create an API key. + # @return [String] + # + # @see http://docs.aws.amazon.com/goto/WebAPI/grafana-2020-08-18/CreateWorkspaceApiKeyRequest AWS API Documentation + # + class CreateWorkspaceApiKeyRequest < Struct.new( + :key_name, + :key_role, + :seconds_to_live, + :workspace_id) + SENSITIVE = [] + include Aws::Structure + end + + # @!attribute [rw] key + # The key token that was created. Use this value as a bearer token to + # authenticate HTTP requests to the workspace. + # @return [String] + # + # @!attribute [rw] key_name + # The name of the key that was created. + # @return [String] + # + # @!attribute [rw] workspace_id + # The ID of the workspace that the key is valid for. + # @return [String] + # + # @see http://docs.aws.amazon.com/goto/WebAPI/grafana-2020-08-18/CreateWorkspaceApiKeyResponse AWS API Documentation + # + class CreateWorkspaceApiKeyResponse < Struct.new( + :key, + :key_name, + :workspace_id) + SENSITIVE = [:key] + include Aws::Structure + end + # @note When making an API call, you may pass CreateWorkspaceRequest # data as a hash: # @@ -377,6 +441,48 @@ class CreateWorkspaceResponse < Struct.new( include Aws::Structure end + # @note When making an API call, you may pass DeleteWorkspaceApiKeyRequest + # data as a hash: + # + # { + # key_name: "ApiKeyName", # required + # workspace_id: "WorkspaceId", # required + # } + # + # @!attribute [rw] key_name + # The name of the API key to delete. + # @return [String] + # + # @!attribute [rw] workspace_id + # The ID of the workspace to delete. + # @return [String] + # + # @see http://docs.aws.amazon.com/goto/WebAPI/grafana-2020-08-18/DeleteWorkspaceApiKeyRequest AWS API Documentation + # + class DeleteWorkspaceApiKeyRequest < Struct.new( + :key_name, + :workspace_id) + SENSITIVE = [] + include Aws::Structure + end + + # @!attribute [rw] key_name + # The name of the API key that was deleted. + # @return [String] + # + # @!attribute [rw] workspace_id + # The ID of the workspace where the key was deleted. + # @return [String] + # + # @see http://docs.aws.amazon.com/goto/WebAPI/grafana-2020-08-18/DeleteWorkspaceApiKeyResponse AWS API Documentation + # + class DeleteWorkspaceApiKeyResponse < Struct.new( + :key_name, + :workspace_id) + SENSITIVE = [] + include Aws::Structure + end + # @note When making an API call, you may pass DeleteWorkspaceRequest # data as a hash: # @@ -1041,7 +1147,7 @@ class UpdateError < Struct.new( # # { # action: "ADD", # required, accepts ADD, REVOKE - # role: "ADMIN", # required, accepts ADMIN, EDITOR + # role: "ADMIN", # required, accepts ADMIN, EDITOR, VIEWER # users: [ # required # { # id: "SsoId", # required @@ -1081,7 +1187,7 @@ class UpdateInstruction < Struct.new( # update_instruction_batch: [ # required # { # action: "ADD", # required, accepts ADD, REVOKE - # role: "ADMIN", # required, accepts ADMIN, EDITOR + # role: "ADMIN", # required, accepts ADMIN, EDITOR, VIEWER # users: [ # required # { # id: "SsoId", # required