create_workspace
async
¶
create_workspace(
account_access_type: AccountAccessType,
permission_type: PermissionType,
authentication_providers: AuthenticationProviders,
*,
config_overrides: Optional[AsyncgrafanaClientConfig] = None,
client_token: Optional[ClientToken] = None,
organization_role_name: Optional[OrganizationRoleName] = None,
stack_set_name: Optional[StackSetName] = None,
workspace_data_sources: Optional[DataSourceTypesList] = None,
workspace_description: Optional[Description] = None,
workspace_name: Optional[WorkspaceName] = None,
workspace_notification_destinations: Optional[NotificationDestinationsList] = None,
workspace_organizational_units: Optional[OrganizationalUnitList] = None,
workspace_role_arn: Optional[IamRoleArn] = None,
tags: Optional[TagMap] = None,
vpc_configuration: Optional[VpcConfiguration] = None,
configuration: Optional[OverridableConfigurationJson] = None,
network_access_control: Optional[NetworkAccessConfiguration] = None,
grafana_version: Optional[GrafanaVersion] = None,
ip_address_type: Optional[IPAddressType] = None,
kms_key_id: Optional[KmsKeyId] = None,
) -> CreateWorkspaceResponse
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.
Parameters:
-
account_access_type(AccountAccessType) –Specifies whether the workspace can access Amazon Web Services resources in this Amazon Web Services account only, or whether it can also access Amazon Web Services resources in other accounts in the same organization. If you specify
ORGANIZATION, you must specify which organizational units the workspace can access in theworkspaceOrganizationalUnitsparameter. -
client_token(Optional[ClientToken], default:None) –A unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
-
organization_role_name(Optional[OrganizationRoleName], default:None) –The name of an IAM role that already exists to use with Organizations to access Amazon Web Services data sources and notification channels in other accounts in an organization.
-
permission_type(PermissionType) –When creating a workspace through the Amazon Web Services API, CLI or Amazon Web Services CloudFormation, you must manage IAM roles and provision the permissions that the workspace needs to use Amazon Web Services data sources and notification channels.
You must also specify a
workspaceRoleArnfor a role that you will manage for the workspace to use when accessing those datasources and notification channels.The ability for Amazon Managed Grafana to create and update IAM roles on behalf of the user is supported only in the Amazon Managed Grafana console, where this value may be set to
SERVICE_MANAGED.Use only the
CUSTOMER_MANAGEDpermission type when creating a workspace with the API, CLI or Amazon Web Services CloudFormation.For more information, see Amazon Managed Grafana permissions and policies for Amazon Web Services data sources and notification channels.
-
stack_set_name(Optional[StackSetName], default:None) –The name of the CloudFormation stack set to use to generate IAM roles to be used for this workspace.
-
workspace_data_sources(Optional[DataSourceTypesList], default:None) –This parameter is for internal use only, and should not be used.
-
workspace_description(Optional[Description], default:None) –A description for the workspace. This is used only to help you identify this workspace.
Pattern:
^[\\p{L}\\p{Z}\\p{N}\\p{P}]{0,2048}$ -
workspace_name(Optional[WorkspaceName], default:None) –The name for the workspace. It does not have to be unique.
-
workspace_notification_destinations(Optional[NotificationDestinationsList], default:None) –Specify the Amazon Web Services notification channels that you plan to use in this workspace. Specifying these data sources here enables Amazon Managed Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to use these channels.
-
workspace_organizational_units(Optional[OrganizationalUnitList], default:None) –Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.
-
workspace_role_arn(Optional[IamRoleArn], default:None) –Specified the IAM role that grants permissions to the Amazon Web Services resources that the workspace will view data from, including both data sources and notification channels. You are responsible for managing the permissions for this role as new data sources or notification channels are added.
-
authentication_providers(AuthenticationProviders) –Specifies whether this workspace uses SAML 2.0, IAM Identity Center, or both to authenticate users for using the Grafana console within a workspace. For more information, see User authentication in Amazon Managed Grafana.
-
tags(Optional[TagMap], default:None) –The list of tags associated with the workspace.
-
vpc_configuration(Optional[VpcConfiguration], default:None) –The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to.
Connecting to a private VPC is not yet available in the Asia Pacific (Seoul) Region (ap-northeast-2).
-
configuration(Optional[OverridableConfigurationJson], default:None) –The configuration string for the workspace that you create. For more information about the format and configuration options available, see Working in your Grafana workspace.
-
network_access_control(Optional[NetworkAccessConfiguration], default:None) –Configuration for network access to your workspace.
When this is configured, only listed IP addresses and VPC endpoints will be able to access your workspace. Standard Grafana authentication and authorization will still be required.
If this is not configured, or is removed, then all IP addresses and VPC endpoints will be allowed. Standard Grafana authentication and authorization will still be required.
-
grafana_version(Optional[GrafanaVersion], default:None) –Specifies the version of Grafana to support in the new workspace. If not specified, defaults to the latest version (for example, 10.4).
To get a list of supported versions, use the
ListVersionsoperation. -
ip_address_type(Optional[IPAddressType], default:None) –Specifies whether the workspace supports IPv4 only, or IPv4 and IPv6. Valid values are
IPv4andDualStack. For more information about IP address types, see Network access control. -
kms_key_id(Optional[KmsKeyId], default:None) –The ID or ARN of the Key Management Service key to use for encrypting workspace data.
Raises:
-
AccessDeniedException–You do not have sufficient permissions to perform this action.
-
ConflictException–A resource was in an inconsistent state during an update or a deletion.
-
InternalServerException–Unexpected error while processing the request. Retry the request.
-
ServiceQuotaExceededException–The request would cause a service quota to be exceeded.
-
ThrottlingException–The request was denied because of request throttling. Retry the request.
-
ValidationException–The value of a parameter in the request caused an error.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_grafana/_services/async_grafana.py
1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 | |