Skip to content

ManagedGrafanaClient#

Index > ManagedGrafana > ManagedGrafanaClient

Auto-generated documentation for ManagedGrafana type annotations stubs module mypy-boto3-grafana.

ManagedGrafanaClient#

Type annotations and code completion for boto3.client("grafana"). boto3 documentation

# ManagedGrafanaClient usage example

from boto3.session import Session
from mypy_boto3_grafana.client import ManagedGrafanaClient

def get_grafana_client() -> ManagedGrafanaClient:
    return Session().client("grafana")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("grafana").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("grafana")

try:
    do_something(client)
except (
    client.exceptions.AccessDeniedException,
    client.exceptions.ClientError,
    client.exceptions.ConflictException,
    client.exceptions.InternalServerException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ServiceQuotaExceededException,
    client.exceptions.ThrottlingException,
    client.exceptions.ValidationException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_grafana.client import Exceptions

def handle_error(exc: Exceptions.AccessDeniedException) -> None:
    ...

Methods#

associate_license#

Assigns a Grafana Enterprise license to a workspace.

Type annotations and code completion for boto3.client("grafana").associate_license method. boto3 documentation

# associate_license method definition

def associate_license(
    self,
    *,
    licenseType: LicenseTypeType,  # (1)
    workspaceId: str,
    grafanaToken: str = ...,
) -> AssociateLicenseResponseTypeDef:  # (2)
    ...
  1. See LicenseTypeType
  2. See AssociateLicenseResponseTypeDef
# associate_license method usage example with argument unpacking

kwargs: AssociateLicenseRequestRequestTypeDef = {  # (1)
    "licenseType": ...,
    "workspaceId": ...,
}

parent.associate_license(**kwargs)
  1. See AssociateLicenseRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("grafana").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close#

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("grafana").close method. boto3 documentation

# close method definition

def close(
    self,
) -> None:
    ...

create_workspace#

Creates a workspace.

Type annotations and code completion for boto3.client("grafana").create_workspace method. boto3 documentation

# create_workspace method definition

def create_workspace(
    self,
    *,
    accountAccessType: AccountAccessTypeType,  # (1)
    authenticationProviders: Sequence[AuthenticationProviderTypesType],  # (2)
    permissionType: PermissionTypeType,  # (3)
    clientToken: str = ...,
    configuration: str = ...,
    grafanaVersion: str = ...,
    networkAccessControl: Union[NetworkAccessConfigurationTypeDef, NetworkAccessConfigurationOutputTypeDef] = ...,  # (4)
    organizationRoleName: str = ...,
    stackSetName: str = ...,
    tags: Mapping[str, str] = ...,
    vpcConfiguration: Union[VpcConfigurationTypeDef, VpcConfigurationOutputTypeDef] = ...,  # (5)
    workspaceDataSources: Sequence[DataSourceTypeType] = ...,  # (6)
    workspaceDescription: str = ...,
    workspaceName: str = ...,
    workspaceNotificationDestinations: Sequence[NotificationDestinationTypeType] = ...,  # (7)
    workspaceOrganizationalUnits: Sequence[str] = ...,
    workspaceRoleArn: str = ...,
) -> CreateWorkspaceResponseTypeDef:  # (8)
    ...
  1. See AccountAccessTypeType
  2. See AuthenticationProviderTypesType
  3. See PermissionTypeType
  4. See NetworkAccessConfigurationTypeDef NetworkAccessConfigurationOutputTypeDef
  5. See VpcConfigurationTypeDef VpcConfigurationOutputTypeDef
  6. See DataSourceTypeType
  7. See NotificationDestinationTypeType
  8. See CreateWorkspaceResponseTypeDef
# create_workspace method usage example with argument unpacking

kwargs: CreateWorkspaceRequestRequestTypeDef = {  # (1)
    "accountAccessType": ...,
    "authenticationProviders": ...,
    "permissionType": ...,
}

parent.create_workspace(**kwargs)
  1. See CreateWorkspaceRequestRequestTypeDef

create_workspace_api_key#

Creates a Grafana API key for the workspace.

Type annotations and code completion for boto3.client("grafana").create_workspace_api_key method. boto3 documentation

# create_workspace_api_key method definition

def create_workspace_api_key(
    self,
    *,
    keyName: str,
    keyRole: str,
    secondsToLive: int,
    workspaceId: str,
) -> CreateWorkspaceApiKeyResponseTypeDef:  # (1)
    ...
  1. See CreateWorkspaceApiKeyResponseTypeDef
# create_workspace_api_key method usage example with argument unpacking

kwargs: CreateWorkspaceApiKeyRequestRequestTypeDef = {  # (1)
    "keyName": ...,
    "keyRole": ...,
    "secondsToLive": ...,
    "workspaceId": ...,
}

parent.create_workspace_api_key(**kwargs)
  1. See CreateWorkspaceApiKeyRequestRequestTypeDef

create_workspace_service_account#

Creates a service account for the workspace.

Type annotations and code completion for boto3.client("grafana").create_workspace_service_account method. boto3 documentation

# create_workspace_service_account method definition

def create_workspace_service_account(
    self,
    *,
    grafanaRole: RoleType,  # (1)
    name: str,
    workspaceId: str,
) -> CreateWorkspaceServiceAccountResponseTypeDef:  # (2)
    ...
  1. See RoleType
  2. See CreateWorkspaceServiceAccountResponseTypeDef
# create_workspace_service_account method usage example with argument unpacking

kwargs: CreateWorkspaceServiceAccountRequestRequestTypeDef = {  # (1)
    "grafanaRole": ...,
    "name": ...,
    "workspaceId": ...,
}

parent.create_workspace_service_account(**kwargs)
  1. See CreateWorkspaceServiceAccountRequestRequestTypeDef

create_workspace_service_account_token#

Creates a token that can be used to authenticate and authorize Grafana HTTP API operations for the given workspace service account.

Type annotations and code completion for boto3.client("grafana").create_workspace_service_account_token method. boto3 documentation

# create_workspace_service_account_token method definition

def create_workspace_service_account_token(
    self,
    *,
    name: str,
    secondsToLive: int,
    serviceAccountId: str,
    workspaceId: str,
) -> CreateWorkspaceServiceAccountTokenResponseTypeDef:  # (1)
    ...
  1. See CreateWorkspaceServiceAccountTokenResponseTypeDef
# create_workspace_service_account_token method usage example with argument unpacking

kwargs: CreateWorkspaceServiceAccountTokenRequestRequestTypeDef = {  # (1)
    "name": ...,
    "secondsToLive": ...,
    "serviceAccountId": ...,
    "workspaceId": ...,
}

parent.create_workspace_service_account_token(**kwargs)
  1. See CreateWorkspaceServiceAccountTokenRequestRequestTypeDef

delete_workspace#

Deletes an Amazon Managed Grafana workspace.

Type annotations and code completion for boto3.client("grafana").delete_workspace method. boto3 documentation

# delete_workspace method definition

def delete_workspace(
    self,
    *,
    workspaceId: str,
) -> DeleteWorkspaceResponseTypeDef:  # (1)
    ...
  1. See DeleteWorkspaceResponseTypeDef
# delete_workspace method usage example with argument unpacking

kwargs: DeleteWorkspaceRequestRequestTypeDef = {  # (1)
    "workspaceId": ...,
}

parent.delete_workspace(**kwargs)
  1. See DeleteWorkspaceRequestRequestTypeDef

delete_workspace_api_key#

Deletes a Grafana API key for the workspace.

Type annotations and code completion for boto3.client("grafana").delete_workspace_api_key method. boto3 documentation

# delete_workspace_api_key method definition

def delete_workspace_api_key(
    self,
    *,
    keyName: str,
    workspaceId: str,
) -> DeleteWorkspaceApiKeyResponseTypeDef:  # (1)
    ...
  1. See DeleteWorkspaceApiKeyResponseTypeDef
# delete_workspace_api_key method usage example with argument unpacking

kwargs: DeleteWorkspaceApiKeyRequestRequestTypeDef = {  # (1)
    "keyName": ...,
    "workspaceId": ...,
}

parent.delete_workspace_api_key(**kwargs)
  1. See DeleteWorkspaceApiKeyRequestRequestTypeDef

delete_workspace_service_account#

Deletes a workspace service account from the workspace.

Type annotations and code completion for boto3.client("grafana").delete_workspace_service_account method. boto3 documentation

# delete_workspace_service_account method definition

def delete_workspace_service_account(
    self,
    *,
    serviceAccountId: str,
    workspaceId: str,
) -> DeleteWorkspaceServiceAccountResponseTypeDef:  # (1)
    ...
  1. See DeleteWorkspaceServiceAccountResponseTypeDef
# delete_workspace_service_account method usage example with argument unpacking

kwargs: DeleteWorkspaceServiceAccountRequestRequestTypeDef = {  # (1)
    "serviceAccountId": ...,
    "workspaceId": ...,
}

parent.delete_workspace_service_account(**kwargs)
  1. See DeleteWorkspaceServiceAccountRequestRequestTypeDef

delete_workspace_service_account_token#

Deletes a token for the workspace service account.

Type annotations and code completion for boto3.client("grafana").delete_workspace_service_account_token method. boto3 documentation

# delete_workspace_service_account_token method definition

def delete_workspace_service_account_token(
    self,
    *,
    serviceAccountId: str,
    tokenId: str,
    workspaceId: str,
) -> DeleteWorkspaceServiceAccountTokenResponseTypeDef:  # (1)
    ...
  1. See DeleteWorkspaceServiceAccountTokenResponseTypeDef
# delete_workspace_service_account_token method usage example with argument unpacking

kwargs: DeleteWorkspaceServiceAccountTokenRequestRequestTypeDef = {  # (1)
    "serviceAccountId": ...,
    "tokenId":