{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Grafana.CreateWorkspace
(
CreateWorkspace (..),
newCreateWorkspace,
createWorkspace_workspaceRoleArn,
createWorkspace_clientToken,
createWorkspace_workspaceDataSources,
createWorkspace_workspaceNotificationDestinations,
createWorkspace_workspaceName,
createWorkspace_organizationRoleName,
createWorkspace_workspaceDescription,
createWorkspace_stackSetName,
createWorkspace_workspaceOrganizationalUnits,
createWorkspace_accountAccessType,
createWorkspace_authenticationProviders,
createWorkspace_permissionType,
CreateWorkspaceResponse (..),
newCreateWorkspaceResponse,
createWorkspaceResponse_httpStatus,
createWorkspaceResponse_workspace,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Grafana.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateWorkspace = CreateWorkspace'
{
CreateWorkspace -> Maybe (Sensitive Text)
workspaceRoleArn :: Prelude.Maybe (Core.Sensitive Prelude.Text),
CreateWorkspace -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
CreateWorkspace -> Maybe [DataSourceType]
workspaceDataSources :: Prelude.Maybe [DataSourceType],
CreateWorkspace -> Maybe [NotificationDestinationType]
workspaceNotificationDestinations :: Prelude.Maybe [NotificationDestinationType],
CreateWorkspace -> Maybe (Sensitive Text)
workspaceName :: Prelude.Maybe (Core.Sensitive Prelude.Text),
CreateWorkspace -> Maybe (Sensitive Text)
organizationRoleName :: Prelude.Maybe (Core.Sensitive Prelude.Text),
CreateWorkspace -> Maybe (Sensitive Text)
workspaceDescription :: Prelude.Maybe (Core.Sensitive Prelude.Text),
CreateWorkspace -> Maybe Text
stackSetName :: Prelude.Maybe Prelude.Text,
CreateWorkspace -> Maybe (Sensitive [Text])
workspaceOrganizationalUnits :: Prelude.Maybe (Core.Sensitive [Prelude.Text]),
CreateWorkspace -> AccountAccessType
accountAccessType :: AccountAccessType,
CreateWorkspace -> [AuthenticationProviderTypes]
authenticationProviders :: [AuthenticationProviderTypes],
CreateWorkspace -> PermissionType
permissionType :: PermissionType
}
deriving (CreateWorkspace -> CreateWorkspace -> Bool
(CreateWorkspace -> CreateWorkspace -> Bool)
-> (CreateWorkspace -> CreateWorkspace -> Bool)
-> Eq CreateWorkspace
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateWorkspace -> CreateWorkspace -> Bool
$c/= :: CreateWorkspace -> CreateWorkspace -> Bool
== :: CreateWorkspace -> CreateWorkspace -> Bool
$c== :: CreateWorkspace -> CreateWorkspace -> Bool
Prelude.Eq, Int -> CreateWorkspace -> ShowS
[CreateWorkspace] -> ShowS
CreateWorkspace -> String
(Int -> CreateWorkspace -> ShowS)
-> (CreateWorkspace -> String)
-> ([CreateWorkspace] -> ShowS)
-> Show CreateWorkspace
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateWorkspace] -> ShowS
$cshowList :: [CreateWorkspace] -> ShowS
show :: CreateWorkspace -> String
$cshow :: CreateWorkspace -> String
showsPrec :: Int -> CreateWorkspace -> ShowS
$cshowsPrec :: Int -> CreateWorkspace -> ShowS
Prelude.Show, (forall x. CreateWorkspace -> Rep CreateWorkspace x)
-> (forall x. Rep CreateWorkspace x -> CreateWorkspace)
-> Generic CreateWorkspace
forall x. Rep CreateWorkspace x -> CreateWorkspace
forall x. CreateWorkspace -> Rep CreateWorkspace x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateWorkspace x -> CreateWorkspace
$cfrom :: forall x. CreateWorkspace -> Rep CreateWorkspace x
Prelude.Generic)
newCreateWorkspace ::
AccountAccessType ->
PermissionType ->
CreateWorkspace
newCreateWorkspace :: AccountAccessType -> PermissionType -> CreateWorkspace
newCreateWorkspace
AccountAccessType
pAccountAccessType_
PermissionType
pPermissionType_ =
CreateWorkspace' :: Maybe (Sensitive Text)
-> Maybe Text
-> Maybe [DataSourceType]
-> Maybe [NotificationDestinationType]
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe (Sensitive [Text])
-> AccountAccessType
-> [AuthenticationProviderTypes]
-> PermissionType
-> CreateWorkspace
CreateWorkspace'
{ $sel:workspaceRoleArn:CreateWorkspace' :: Maybe (Sensitive Text)
workspaceRoleArn =
Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:clientToken:CreateWorkspace' :: Maybe Text
clientToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:workspaceDataSources:CreateWorkspace' :: Maybe [DataSourceType]
workspaceDataSources = Maybe [DataSourceType]
forall a. Maybe a
Prelude.Nothing,
$sel:workspaceNotificationDestinations:CreateWorkspace' :: Maybe [NotificationDestinationType]
workspaceNotificationDestinations = Maybe [NotificationDestinationType]
forall a. Maybe a
Prelude.Nothing,
$sel:workspaceName:CreateWorkspace' :: Maybe (Sensitive Text)
workspaceName = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:organizationRoleName:CreateWorkspace' :: Maybe (Sensitive Text)
organizationRoleName = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:workspaceDescription:CreateWorkspace' :: Maybe (Sensitive Text)
workspaceDescription = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:stackSetName:CreateWorkspace' :: Maybe Text
stackSetName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:workspaceOrganizationalUnits:CreateWorkspace' :: Maybe (Sensitive [Text])
workspaceOrganizationalUnits = Maybe (Sensitive [Text])
forall a. Maybe a
Prelude.Nothing,
$sel:accountAccessType:CreateWorkspace' :: AccountAccessType
accountAccessType = AccountAccessType
pAccountAccessType_,
$sel:authenticationProviders:CreateWorkspace' :: [AuthenticationProviderTypes]
authenticationProviders = [AuthenticationProviderTypes]
forall a. Monoid a => a
Prelude.mempty,
$sel:permissionType:CreateWorkspace' :: PermissionType
permissionType = PermissionType
pPermissionType_
}
createWorkspace_workspaceRoleArn :: Lens.Lens' CreateWorkspace (Prelude.Maybe Prelude.Text)
createWorkspace_workspaceRoleArn :: (Maybe Text -> f (Maybe Text))
-> CreateWorkspace -> f CreateWorkspace
createWorkspace_workspaceRoleArn = (CreateWorkspace -> Maybe (Sensitive Text))
-> (CreateWorkspace -> Maybe (Sensitive Text) -> CreateWorkspace)
-> Lens
CreateWorkspace
CreateWorkspace
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkspace' {Maybe (Sensitive Text)
workspaceRoleArn :: Maybe (Sensitive Text)
$sel:workspaceRoleArn:CreateWorkspace' :: CreateWorkspace -> Maybe (Sensitive Text)
workspaceRoleArn} -> Maybe (Sensitive Text)
workspaceRoleArn) (\s :: CreateWorkspace
s@CreateWorkspace' {} Maybe (Sensitive Text)
a -> CreateWorkspace
s {$sel:workspaceRoleArn:CreateWorkspace' :: Maybe (Sensitive Text)
workspaceRoleArn = Maybe (Sensitive Text)
a} :: CreateWorkspace) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> CreateWorkspace -> f CreateWorkspace)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> CreateWorkspace
-> f CreateWorkspace
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
createWorkspace_clientToken :: Lens.Lens' CreateWorkspace (Prelude.Maybe Prelude.Text)
createWorkspace_clientToken :: (Maybe Text -> f (Maybe Text))
-> CreateWorkspace -> f CreateWorkspace
createWorkspace_clientToken = (CreateWorkspace -> Maybe Text)
-> (CreateWorkspace -> Maybe Text -> CreateWorkspace)
-> Lens CreateWorkspace CreateWorkspace (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkspace' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateWorkspace' :: CreateWorkspace -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateWorkspace
s@CreateWorkspace' {} Maybe Text
a -> CreateWorkspace
s {$sel:clientToken:CreateWorkspace' :: Maybe Text
clientToken = Maybe Text
a} :: CreateWorkspace)
createWorkspace_workspaceDataSources :: Lens.Lens' CreateWorkspace (Prelude.Maybe [DataSourceType])
createWorkspace_workspaceDataSources :: (Maybe [DataSourceType] -> f (Maybe [DataSourceType]))
-> CreateWorkspace -> f CreateWorkspace
createWorkspace_workspaceDataSources = (CreateWorkspace -> Maybe [DataSourceType])
-> (CreateWorkspace -> Maybe [DataSourceType] -> CreateWorkspace)
-> Lens
CreateWorkspace
CreateWorkspace
(Maybe [DataSourceType])
(Maybe [DataSourceType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkspace' {Maybe [DataSourceType]
workspaceDataSources :: Maybe [DataSourceType]
$sel:workspaceDataSources:CreateWorkspace' :: CreateWorkspace -> Maybe [DataSourceType]
workspaceDataSources} -> Maybe [DataSourceType]
workspaceDataSources) (\s :: CreateWorkspace
s@CreateWorkspace' {} Maybe [DataSourceType]
a -> CreateWorkspace
s {$sel:workspaceDataSources:CreateWorkspace' :: Maybe [DataSourceType]
workspaceDataSources = Maybe [DataSourceType]
a} :: CreateWorkspace) ((Maybe [DataSourceType] -> f (Maybe [DataSourceType]))
-> CreateWorkspace -> f CreateWorkspace)
-> ((Maybe [DataSourceType] -> f (Maybe [DataSourceType]))
-> Maybe [DataSourceType] -> f (Maybe [DataSourceType]))
-> (Maybe [DataSourceType] -> f (Maybe [DataSourceType]))
-> CreateWorkspace
-> f CreateWorkspace
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[DataSourceType] [DataSourceType] [DataSourceType] [DataSourceType]
-> Iso
(Maybe [DataSourceType])
(Maybe [DataSourceType])
(Maybe [DataSourceType])
(Maybe [DataSourceType])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[DataSourceType] [DataSourceType] [DataSourceType] [DataSourceType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createWorkspace_workspaceNotificationDestinations :: Lens.Lens' CreateWorkspace (Prelude.Maybe [NotificationDestinationType])
createWorkspace_workspaceNotificationDestinations :: (Maybe [NotificationDestinationType]
-> f (Maybe [NotificationDestinationType]))
-> CreateWorkspace -> f CreateWorkspace
createWorkspace_workspaceNotificationDestinations = (CreateWorkspace -> Maybe [NotificationDestinationType])
-> (CreateWorkspace
-> Maybe [NotificationDestinationType] -> CreateWorkspace)
-> Lens
CreateWorkspace
CreateWorkspace
(Maybe [NotificationDestinationType])
(Maybe [NotificationDestinationType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkspace' {Maybe [NotificationDestinationType]
workspaceNotificationDestinations :: Maybe [NotificationDestinationType]
$sel:workspaceNotificationDestinations:CreateWorkspace' :: CreateWorkspace -> Maybe [NotificationDestinationType]
workspaceNotificationDestinations} -> Maybe [NotificationDestinationType]
workspaceNotificationDestinations) (\s :: CreateWorkspace
s@CreateWorkspace' {} Maybe [NotificationDestinationType]
a -> CreateWorkspace
s {$sel:workspaceNotificationDestinations:CreateWorkspace' :: Maybe [NotificationDestinationType]
workspaceNotificationDestinations = Maybe [NotificationDestinationType]
a} :: CreateWorkspace) ((Maybe [NotificationDestinationType]
-> f (Maybe [NotificationDestinationType]))
-> CreateWorkspace -> f CreateWorkspace)
-> ((Maybe [NotificationDestinationType]
-> f (Maybe [NotificationDestinationType]))
-> Maybe [NotificationDestinationType]
-> f (Maybe [NotificationDestinationType]))
-> (Maybe [NotificationDestinationType]
-> f (Maybe [NotificationDestinationType]))
-> CreateWorkspace
-> f CreateWorkspace
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[NotificationDestinationType]
[NotificationDestinationType]
[NotificationDestinationType]
[NotificationDestinationType]
-> Iso
(Maybe [NotificationDestinationType])
(Maybe [NotificationDestinationType])
(Maybe [NotificationDestinationType])
(Maybe [NotificationDestinationType])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[NotificationDestinationType]
[NotificationDestinationType]
[NotificationDestinationType]
[NotificationDestinationType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createWorkspace_workspaceName :: Lens.Lens' CreateWorkspace (Prelude.Maybe Prelude.Text)
createWorkspace_workspaceName :: (Maybe Text -> f (Maybe Text))
-> CreateWorkspace -> f CreateWorkspace
createWorkspace_workspaceName = (CreateWorkspace -> Maybe (Sensitive Text))
-> (CreateWorkspace -> Maybe (Sensitive Text) -> CreateWorkspace)
-> Lens
CreateWorkspace
CreateWorkspace
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkspace' {Maybe (Sensitive Text)
workspaceName :: Maybe (Sensitive Text)
$sel:workspaceName:CreateWorkspace' :: CreateWorkspace -> Maybe (Sensitive Text)
workspaceName} -> Maybe (Sensitive Text)
workspaceName) (\s :: CreateWorkspace
s@CreateWorkspace' {} Maybe (Sensitive Text)
a -> CreateWorkspace
s {$sel:workspaceName:CreateWorkspace' :: Maybe (Sensitive Text)
workspaceName = Maybe (Sensitive Text)
a} :: CreateWorkspace) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> CreateWorkspace -> f CreateWorkspace)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> CreateWorkspace
-> f CreateWorkspace
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
createWorkspace_organizationRoleName :: Lens.Lens' CreateWorkspace (Prelude.Maybe Prelude.Text)
createWorkspace_organizationRoleName :: (Maybe Text -> f (Maybe Text))
-> CreateWorkspace -> f CreateWorkspace
createWorkspace_organizationRoleName = (CreateWorkspace -> Maybe (Sensitive Text))
-> (CreateWorkspace -> Maybe (Sensitive Text) -> CreateWorkspace)
-> Lens
CreateWorkspace
CreateWorkspace
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkspace' {Maybe (Sensitive Text)
organizationRoleName :: Maybe (Sensitive Text)
$sel:organizationRoleName:CreateWorkspace' :: CreateWorkspace -> Maybe (Sensitive Text)
organizationRoleName} -> Maybe (Sensitive Text)
organizationRoleName) (\s :: CreateWorkspace
s@CreateWorkspace' {} Maybe (Sensitive Text)
a -> CreateWorkspace
s {$sel:organizationRoleName:CreateWorkspace' :: Maybe (Sensitive Text)
organizationRoleName = Maybe (Sensitive Text)
a} :: CreateWorkspace) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> CreateWorkspace -> f CreateWorkspace)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> CreateWorkspace
-> f CreateWorkspace
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
createWorkspace_workspaceDescription :: Lens.Lens' CreateWorkspace (Prelude.Maybe Prelude.Text)
createWorkspace_workspaceDescription :: (Maybe Text -> f (Maybe Text))
-> CreateWorkspace -> f CreateWorkspace
createWorkspace_workspaceDescription = (CreateWorkspace -> Maybe (Sensitive Text))
-> (CreateWorkspace -> Maybe (Sensitive Text) -> CreateWorkspace)
-> Lens
CreateWorkspace
CreateWorkspace
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkspace' {Maybe (Sensitive Text)
workspaceDescription :: Maybe (Sensitive Text)
$sel:workspaceDescription:CreateWorkspace' :: CreateWorkspace -> Maybe (Sensitive Text)
workspaceDescription} -> Maybe (Sensitive Text)
workspaceDescription) (\s :: CreateWorkspace
s@CreateWorkspace' {} Maybe (Sensitive Text)
a -> CreateWorkspace
s {$sel:workspaceDescription:CreateWorkspace' :: Maybe (Sensitive Text)
workspaceDescription = Maybe (Sensitive Text)
a} :: CreateWorkspace) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> CreateWorkspace -> f CreateWorkspace)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> CreateWorkspace
-> f CreateWorkspace
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
createWorkspace_stackSetName :: Lens.Lens' CreateWorkspace (Prelude.Maybe Prelude.Text)
createWorkspace_stackSetName :: (Maybe Text -> f (Maybe Text))
-> CreateWorkspace -> f CreateWorkspace
createWorkspace_stackSetName = (CreateWorkspace -> Maybe Text)
-> (CreateWorkspace -> Maybe Text -> CreateWorkspace)
-> Lens CreateWorkspace CreateWorkspace (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkspace' {Maybe Text
stackSetName :: Maybe Text
$sel:stackSetName:CreateWorkspace' :: CreateWorkspace -> Maybe Text
stackSetName} -> Maybe Text
stackSetName) (\s :: CreateWorkspace
s@CreateWorkspace' {} Maybe Text
a -> CreateWorkspace
s {$sel:stackSetName:CreateWorkspace' :: Maybe Text
stackSetName = Maybe Text
a} :: CreateWorkspace)
createWorkspace_workspaceOrganizationalUnits :: Lens.Lens' CreateWorkspace (Prelude.Maybe [Prelude.Text])
createWorkspace_workspaceOrganizationalUnits :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateWorkspace -> f CreateWorkspace
createWorkspace_workspaceOrganizationalUnits = (CreateWorkspace -> Maybe (Sensitive [Text]))
-> (CreateWorkspace -> Maybe (Sensitive [Text]) -> CreateWorkspace)
-> Lens
CreateWorkspace
CreateWorkspace
(Maybe (Sensitive [Text]))
(Maybe (Sensitive [Text]))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkspace' {Maybe (Sensitive [Text])
workspaceOrganizationalUnits :: Maybe (Sensitive [Text])
$sel:workspaceOrganizationalUnits:CreateWorkspace' :: CreateWorkspace -> Maybe (Sensitive [Text])
workspaceOrganizationalUnits} -> Maybe (Sensitive [Text])
workspaceOrganizationalUnits) (\s :: CreateWorkspace
s@CreateWorkspace' {} Maybe (Sensitive [Text])
a -> CreateWorkspace
s {$sel:workspaceOrganizationalUnits:CreateWorkspace' :: Maybe (Sensitive [Text])
workspaceOrganizationalUnits = Maybe (Sensitive [Text])
a} :: CreateWorkspace) ((Maybe (Sensitive [Text]) -> f (Maybe (Sensitive [Text])))
-> CreateWorkspace -> f CreateWorkspace)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe (Sensitive [Text]) -> f (Maybe (Sensitive [Text])))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateWorkspace
-> f CreateWorkspace
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive [Text]) (Sensitive [Text]) [Text] [Text]
-> Iso
(Maybe (Sensitive [Text]))
(Maybe (Sensitive [Text]))
(Maybe [Text])
(Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping (AnIso (Sensitive [Text]) (Sensitive [Text]) [Text] [Text]
forall a. Iso' (Sensitive a) a
Core._Sensitive AnIso (Sensitive [Text]) (Sensitive [Text]) [Text] [Text]
-> (Exchange [Text] [Text] [Text] (Identity [Text])
-> Exchange [Text] [Text] [Text] (Identity [Text]))
-> AnIso (Sensitive [Text]) (Sensitive [Text]) [Text] [Text]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Exchange [Text] [Text] [Text] (Identity [Text])
-> Exchange [Text] [Text] [Text] (Identity [Text])
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)
createWorkspace_accountAccessType :: Lens.Lens' CreateWorkspace AccountAccessType
createWorkspace_accountAccessType :: (AccountAccessType -> f AccountAccessType)
-> CreateWorkspace -> f CreateWorkspace
createWorkspace_accountAccessType = (CreateWorkspace -> AccountAccessType)
-> (CreateWorkspace -> AccountAccessType -> CreateWorkspace)
-> Lens
CreateWorkspace CreateWorkspace AccountAccessType AccountAccessType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkspace' {AccountAccessType
accountAccessType :: AccountAccessType
$sel:accountAccessType:CreateWorkspace' :: CreateWorkspace -> AccountAccessType
accountAccessType} -> AccountAccessType
accountAccessType) (\s :: CreateWorkspace
s@CreateWorkspace' {} AccountAccessType
a -> CreateWorkspace
s {$sel:accountAccessType:CreateWorkspace' :: AccountAccessType
accountAccessType = AccountAccessType
a} :: CreateWorkspace)
createWorkspace_authenticationProviders :: Lens.Lens' CreateWorkspace [AuthenticationProviderTypes]
createWorkspace_authenticationProviders :: ([AuthenticationProviderTypes] -> f [AuthenticationProviderTypes])
-> CreateWorkspace -> f CreateWorkspace
createWorkspace_authenticationProviders = (CreateWorkspace -> [AuthenticationProviderTypes])
-> (CreateWorkspace
-> [AuthenticationProviderTypes] -> CreateWorkspace)
-> Lens
CreateWorkspace
CreateWorkspace
[AuthenticationProviderTypes]
[AuthenticationProviderTypes]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkspace' {[AuthenticationProviderTypes]
authenticationProviders :: [AuthenticationProviderTypes]
$sel:authenticationProviders:CreateWorkspace' :: CreateWorkspace -> [AuthenticationProviderTypes]
authenticationProviders} -> [AuthenticationProviderTypes]
authenticationProviders) (\s :: CreateWorkspace
s@CreateWorkspace' {} [AuthenticationProviderTypes]
a -> CreateWorkspace
s {$sel:authenticationProviders:CreateWorkspace' :: [AuthenticationProviderTypes]
authenticationProviders = [AuthenticationProviderTypes]
a} :: CreateWorkspace) (([AuthenticationProviderTypes] -> f [AuthenticationProviderTypes])
-> CreateWorkspace -> f CreateWorkspace)
-> (([AuthenticationProviderTypes]
-> f [AuthenticationProviderTypes])
-> [AuthenticationProviderTypes]
-> f [AuthenticationProviderTypes])
-> ([AuthenticationProviderTypes]
-> f [AuthenticationProviderTypes])
-> CreateWorkspace
-> f CreateWorkspace
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([AuthenticationProviderTypes] -> f [AuthenticationProviderTypes])
-> [AuthenticationProviderTypes] -> f [AuthenticationProviderTypes]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createWorkspace_permissionType :: Lens.Lens' CreateWorkspace PermissionType
createWorkspace_permissionType :: (PermissionType -> f PermissionType)
-> CreateWorkspace -> f CreateWorkspace
createWorkspace_permissionType = (CreateWorkspace -> PermissionType)
-> (CreateWorkspace -> PermissionType -> CreateWorkspace)
-> Lens
CreateWorkspace CreateWorkspace PermissionType PermissionType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkspace' {PermissionType
permissionType :: PermissionType
$sel:permissionType:CreateWorkspace' :: CreateWorkspace -> PermissionType
permissionType} -> PermissionType
permissionType) (\s :: CreateWorkspace
s@CreateWorkspace' {} PermissionType
a -> CreateWorkspace
s {$sel:permissionType:CreateWorkspace' :: PermissionType
permissionType = PermissionType
a} :: CreateWorkspace)
instance Core.AWSRequest CreateWorkspace where
type
AWSResponse CreateWorkspace =
CreateWorkspaceResponse
request :: CreateWorkspace -> Request CreateWorkspace
request = Service -> CreateWorkspace -> Request CreateWorkspace
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateWorkspace
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateWorkspace)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateWorkspace))
-> Logger
-> Service
-> Proxy CreateWorkspace
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateWorkspace)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Int -> WorkspaceDescription -> CreateWorkspaceResponse
CreateWorkspaceResponse'
(Int -> WorkspaceDescription -> CreateWorkspaceResponse)
-> Either String Int
-> Either String (WorkspaceDescription -> CreateWorkspaceResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
Either String (WorkspaceDescription -> CreateWorkspaceResponse)
-> Either String WorkspaceDescription
-> Either String CreateWorkspaceResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String WorkspaceDescription
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"workspace")
)
instance Prelude.Hashable CreateWorkspace
instance Prelude.NFData CreateWorkspace
instance Core.ToHeaders CreateWorkspace where
toHeaders :: CreateWorkspace -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateWorkspace -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateWorkspace where
toJSON :: CreateWorkspace -> Value
toJSON CreateWorkspace' {[AuthenticationProviderTypes]
Maybe [DataSourceType]
Maybe [NotificationDestinationType]
Maybe Text
Maybe (Sensitive [Text])
Maybe (Sensitive Text)
AccountAccessType
PermissionType
permissionType :: PermissionType
authenticationProviders :: [AuthenticationProviderTypes]
accountAccessType :: AccountAccessType
workspaceOrganizationalUnits :: Maybe (Sensitive [Text])
stackSetName :: Maybe Text
workspaceDescription :: Maybe (Sensitive Text)
organizationRoleName :: Maybe (Sensitive Text)
workspaceName :: Maybe (Sensitive Text)
workspaceNotificationDestinations :: Maybe [NotificationDestinationType]
workspaceDataSources :: Maybe [DataSourceType]
clientToken :: Maybe Text
workspaceRoleArn :: Maybe (Sensitive Text)
$sel:permissionType:CreateWorkspace' :: CreateWorkspace -> PermissionType
$sel:authenticationProviders:CreateWorkspace' :: CreateWorkspace -> [AuthenticationProviderTypes]
$sel:accountAccessType:CreateWorkspace' :: CreateWorkspace -> AccountAccessType
$sel:workspaceOrganizationalUnits:CreateWorkspace' :: CreateWorkspace -> Maybe (Sensitive [Text])
$sel:stackSetName:CreateWorkspace' :: CreateWorkspace -> Maybe Text
$sel:workspaceDescription:CreateWorkspace' :: CreateWorkspace -> Maybe (Sensitive Text)
$sel:organizationRoleName:CreateWorkspace' :: CreateWorkspace -> Maybe (Sensitive Text)
$sel:workspaceName:CreateWorkspace' :: CreateWorkspace -> Maybe (Sensitive Text)
$sel:workspaceNotificationDestinations:CreateWorkspace' :: CreateWorkspace -> Maybe [NotificationDestinationType]
$sel:workspaceDataSources:CreateWorkspace' :: CreateWorkspace -> Maybe [DataSourceType]
$sel:clientToken:CreateWorkspace' :: CreateWorkspace -> Maybe Text
$sel:workspaceRoleArn:CreateWorkspace' :: CreateWorkspace -> Maybe (Sensitive Text)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"workspaceRoleArn" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
workspaceRoleArn,
(Text
"clientToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientToken,
(Text
"workspaceDataSources" Text -> [DataSourceType] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([DataSourceType] -> Pair) -> Maybe [DataSourceType] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [DataSourceType]
workspaceDataSources,
(Text
"workspaceNotificationDestinations" Text -> [NotificationDestinationType] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([NotificationDestinationType] -> Pair)
-> Maybe [NotificationDestinationType] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [NotificationDestinationType]
workspaceNotificationDestinations,
(Text
"workspaceName" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
workspaceName,
(Text
"organizationRoleName" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
organizationRoleName,
(Text
"workspaceDescription" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
workspaceDescription,
(Text
"stackSetName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
stackSetName,
(Text
"workspaceOrganizationalUnits" Text -> Sensitive [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Sensitive [Text] -> Pair)
-> Maybe (Sensitive [Text]) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive [Text])
workspaceOrganizationalUnits,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"accountAccessType" Text -> AccountAccessType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= AccountAccessType
accountAccessType),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"authenticationProviders"
Text -> [AuthenticationProviderTypes] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [AuthenticationProviderTypes]
authenticationProviders
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"permissionType" Text -> PermissionType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= PermissionType
permissionType)
]
)
instance Core.ToPath CreateWorkspace where
toPath :: CreateWorkspace -> ByteString
toPath = ByteString -> CreateWorkspace -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/workspaces"
instance Core.ToQuery CreateWorkspace where
toQuery :: CreateWorkspace -> QueryString
toQuery = QueryString -> CreateWorkspace -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateWorkspaceResponse = CreateWorkspaceResponse'
{
CreateWorkspaceResponse -> Int
httpStatus :: Prelude.Int,
CreateWorkspaceResponse -> WorkspaceDescription
workspace :: WorkspaceDescription
}
deriving (CreateWorkspaceResponse -> CreateWorkspaceResponse -> Bool
(CreateWorkspaceResponse -> CreateWorkspaceResponse -> Bool)
-> (CreateWorkspaceResponse -> CreateWorkspaceResponse -> Bool)
-> Eq CreateWorkspaceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateWorkspaceResponse -> CreateWorkspaceResponse -> Bool
$c/= :: CreateWorkspaceResponse -> CreateWorkspaceResponse -> Bool
== :: CreateWorkspaceResponse -> CreateWorkspaceResponse -> Bool
$c== :: CreateWorkspaceResponse -> CreateWorkspaceResponse -> Bool
Prelude.Eq, Int -> CreateWorkspaceResponse -> ShowS
[CreateWorkspaceResponse] -> ShowS
CreateWorkspaceResponse -> String
(Int -> CreateWorkspaceResponse -> ShowS)
-> (CreateWorkspaceResponse -> String)
-> ([CreateWorkspaceResponse] -> ShowS)
-> Show CreateWorkspaceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateWorkspaceResponse] -> ShowS
$cshowList :: [CreateWorkspaceResponse] -> ShowS
show :: CreateWorkspaceResponse -> String
$cshow :: CreateWorkspaceResponse -> String
showsPrec :: Int -> CreateWorkspaceResponse -> ShowS
$cshowsPrec :: Int -> CreateWorkspaceResponse -> ShowS
Prelude.Show, (forall x.
CreateWorkspaceResponse -> Rep CreateWorkspaceResponse x)
-> (forall x.
Rep CreateWorkspaceResponse x -> CreateWorkspaceResponse)
-> Generic CreateWorkspaceResponse
forall x. Rep CreateWorkspaceResponse x -> CreateWorkspaceResponse
forall x. CreateWorkspaceResponse -> Rep CreateWorkspaceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateWorkspaceResponse x -> CreateWorkspaceResponse
$cfrom :: forall x. CreateWorkspaceResponse -> Rep CreateWorkspaceResponse x
Prelude.Generic)
newCreateWorkspaceResponse ::
Prelude.Int ->
WorkspaceDescription ->
CreateWorkspaceResponse
newCreateWorkspaceResponse :: Int -> WorkspaceDescription -> CreateWorkspaceResponse
newCreateWorkspaceResponse Int
pHttpStatus_ WorkspaceDescription
pWorkspace_ =
CreateWorkspaceResponse' :: Int -> WorkspaceDescription -> CreateWorkspaceResponse
CreateWorkspaceResponse'
{ $sel:httpStatus:CreateWorkspaceResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:workspace:CreateWorkspaceResponse' :: WorkspaceDescription
workspace = WorkspaceDescription
pWorkspace_
}
createWorkspaceResponse_httpStatus :: Lens.Lens' CreateWorkspaceResponse Prelude.Int
createWorkspaceResponse_httpStatus :: (Int -> f Int)
-> CreateWorkspaceResponse -> f CreateWorkspaceResponse
createWorkspaceResponse_httpStatus = (CreateWorkspaceResponse -> Int)
-> (CreateWorkspaceResponse -> Int -> CreateWorkspaceResponse)
-> Lens CreateWorkspaceResponse CreateWorkspaceResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkspaceResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateWorkspaceResponse' :: CreateWorkspaceResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateWorkspaceResponse
s@CreateWorkspaceResponse' {} Int
a -> CreateWorkspaceResponse
s {$sel:httpStatus:CreateWorkspaceResponse' :: Int
httpStatus = Int
a} :: CreateWorkspaceResponse)
createWorkspaceResponse_workspace :: Lens.Lens' CreateWorkspaceResponse WorkspaceDescription
createWorkspaceResponse_workspace :: (WorkspaceDescription -> f WorkspaceDescription)
-> CreateWorkspaceResponse -> f CreateWorkspaceResponse
createWorkspaceResponse_workspace = (CreateWorkspaceResponse -> WorkspaceDescription)
-> (CreateWorkspaceResponse
-> WorkspaceDescription -> CreateWorkspaceResponse)
-> Lens
CreateWorkspaceResponse
CreateWorkspaceResponse
WorkspaceDescription
WorkspaceDescription
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorkspaceResponse' {WorkspaceDescription
workspace :: WorkspaceDescription
$sel:workspace:CreateWorkspaceResponse' :: CreateWorkspaceResponse -> WorkspaceDescription
workspace} -> WorkspaceDescription
workspace) (\s :: CreateWorkspaceResponse
s@CreateWorkspaceResponse' {} WorkspaceDescription
a -> CreateWorkspaceResponse
s {$sel:workspace:CreateWorkspaceResponse' :: WorkspaceDescription
workspace = WorkspaceDescription
a} :: CreateWorkspaceResponse)
instance Prelude.NFData CreateWorkspaceResponse