module Network.AWS.Glue.CreateDevEndpoint
(
createDevEndpoint
, CreateDevEndpoint
, cdeExtraPythonLibsS3Path
, cdeSecurityGroupIds
, cdeSubnetId
, cdeNumberOfNodes
, cdeExtraJARsS3Path
, cdeEndpointName
, cdeRoleARN
, cdePublicKey
, createDevEndpointResponse
, CreateDevEndpointResponse
, cdersStatus
, cdersFailureReason
, cdersEndpointName
, cdersExtraPythonLibsS3Path
, cdersSecurityGroupIds
, cdersVPCId
, cdersSubnetId
, cdersNumberOfNodes
, cdersAvailabilityZone
, cdersZeppelinRemoteSparkInterpreterPort
, cdersExtraJARsS3Path
, cdersCreatedTimestamp
, cdersYarnEndpointAddress
, cdersRoleARN
, cdersResponseStatus
) where
import Network.AWS.Glue.Types
import Network.AWS.Glue.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data CreateDevEndpoint = CreateDevEndpoint'
{ _cdeExtraPythonLibsS3Path :: !(Maybe Text)
, _cdeSecurityGroupIds :: !(Maybe [Text])
, _cdeSubnetId :: !(Maybe Text)
, _cdeNumberOfNodes :: !(Maybe Int)
, _cdeExtraJARsS3Path :: !(Maybe Text)
, _cdeEndpointName :: !Text
, _cdeRoleARN :: !Text
, _cdePublicKey :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
createDevEndpoint
:: Text
-> Text
-> Text
-> CreateDevEndpoint
createDevEndpoint pEndpointName_ pRoleARN_ pPublicKey_ =
CreateDevEndpoint'
{ _cdeExtraPythonLibsS3Path = Nothing
, _cdeSecurityGroupIds = Nothing
, _cdeSubnetId = Nothing
, _cdeNumberOfNodes = Nothing
, _cdeExtraJARsS3Path = Nothing
, _cdeEndpointName = pEndpointName_
, _cdeRoleARN = pRoleARN_
, _cdePublicKey = pPublicKey_
}
cdeExtraPythonLibsS3Path :: Lens' CreateDevEndpoint (Maybe Text)
cdeExtraPythonLibsS3Path = lens _cdeExtraPythonLibsS3Path (\ s a -> s{_cdeExtraPythonLibsS3Path = a});
cdeSecurityGroupIds :: Lens' CreateDevEndpoint [Text]
cdeSecurityGroupIds = lens _cdeSecurityGroupIds (\ s a -> s{_cdeSecurityGroupIds = a}) . _Default . _Coerce;
cdeSubnetId :: Lens' CreateDevEndpoint (Maybe Text)
cdeSubnetId = lens _cdeSubnetId (\ s a -> s{_cdeSubnetId = a});
cdeNumberOfNodes :: Lens' CreateDevEndpoint (Maybe Int)
cdeNumberOfNodes = lens _cdeNumberOfNodes (\ s a -> s{_cdeNumberOfNodes = a});
cdeExtraJARsS3Path :: Lens' CreateDevEndpoint (Maybe Text)
cdeExtraJARsS3Path = lens _cdeExtraJARsS3Path (\ s a -> s{_cdeExtraJARsS3Path = a});
cdeEndpointName :: Lens' CreateDevEndpoint Text
cdeEndpointName = lens _cdeEndpointName (\ s a -> s{_cdeEndpointName = a});
cdeRoleARN :: Lens' CreateDevEndpoint Text
cdeRoleARN = lens _cdeRoleARN (\ s a -> s{_cdeRoleARN = a});
cdePublicKey :: Lens' CreateDevEndpoint Text
cdePublicKey = lens _cdePublicKey (\ s a -> s{_cdePublicKey = a});
instance AWSRequest CreateDevEndpoint where
type Rs CreateDevEndpoint = CreateDevEndpointResponse
request = postJSON glue
response
= receiveJSON
(\ s h x ->
CreateDevEndpointResponse' <$>
(x .?> "Status") <*> (x .?> "FailureReason") <*>
(x .?> "EndpointName")
<*> (x .?> "ExtraPythonLibsS3Path")
<*> (x .?> "SecurityGroupIds" .!@ mempty)
<*> (x .?> "VpcId")
<*> (x .?> "SubnetId")
<*> (x .?> "NumberOfNodes")
<*> (x .?> "AvailabilityZone")
<*> (x .?> "ZeppelinRemoteSparkInterpreterPort")
<*> (x .?> "ExtraJarsS3Path")
<*> (x .?> "CreatedTimestamp")
<*> (x .?> "YarnEndpointAddress")
<*> (x .?> "RoleArn")
<*> (pure (fromEnum s)))
instance Hashable CreateDevEndpoint where
instance NFData CreateDevEndpoint where
instance ToHeaders CreateDevEndpoint where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSGlue.CreateDevEndpoint" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON CreateDevEndpoint where
toJSON CreateDevEndpoint'{..}
= object
(catMaybes
[("ExtraPythonLibsS3Path" .=) <$>
_cdeExtraPythonLibsS3Path,
("SecurityGroupIds" .=) <$> _cdeSecurityGroupIds,
("SubnetId" .=) <$> _cdeSubnetId,
("NumberOfNodes" .=) <$> _cdeNumberOfNodes,
("ExtraJarsS3Path" .=) <$> _cdeExtraJARsS3Path,
Just ("EndpointName" .= _cdeEndpointName),
Just ("RoleArn" .= _cdeRoleARN),
Just ("PublicKey" .= _cdePublicKey)])
instance ToPath CreateDevEndpoint where
toPath = const "/"
instance ToQuery CreateDevEndpoint where
toQuery = const mempty
data CreateDevEndpointResponse = CreateDevEndpointResponse'
{ _cdersStatus :: !(Maybe Text)
, _cdersFailureReason :: !(Maybe Text)
, _cdersEndpointName :: !(Maybe Text)
, _cdersExtraPythonLibsS3Path :: !(Maybe Text)
, _cdersSecurityGroupIds :: !(Maybe [Text])
, _cdersVPCId :: !(Maybe Text)
, _cdersSubnetId :: !(Maybe Text)
, _cdersNumberOfNodes :: !(Maybe Int)
, _cdersAvailabilityZone :: !(Maybe Text)
, _cdersZeppelinRemoteSparkInterpreterPort :: !(Maybe Int)
, _cdersExtraJARsS3Path :: !(Maybe Text)
, _cdersCreatedTimestamp :: !(Maybe POSIX)
, _cdersYarnEndpointAddress :: !(Maybe Text)
, _cdersRoleARN :: !(Maybe Text)
, _cdersResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
createDevEndpointResponse
:: Int
-> CreateDevEndpointResponse
createDevEndpointResponse pResponseStatus_ =
CreateDevEndpointResponse'
{ _cdersStatus = Nothing
, _cdersFailureReason = Nothing
, _cdersEndpointName = Nothing
, _cdersExtraPythonLibsS3Path = Nothing
, _cdersSecurityGroupIds = Nothing
, _cdersVPCId = Nothing
, _cdersSubnetId = Nothing
, _cdersNumberOfNodes = Nothing
, _cdersAvailabilityZone = Nothing
, _cdersZeppelinRemoteSparkInterpreterPort = Nothing
, _cdersExtraJARsS3Path = Nothing
, _cdersCreatedTimestamp = Nothing
, _cdersYarnEndpointAddress = Nothing
, _cdersRoleARN = Nothing
, _cdersResponseStatus = pResponseStatus_
}
cdersStatus :: Lens' CreateDevEndpointResponse (Maybe Text)
cdersStatus = lens _cdersStatus (\ s a -> s{_cdersStatus = a});
cdersFailureReason :: Lens' CreateDevEndpointResponse (Maybe Text)
cdersFailureReason = lens _cdersFailureReason (\ s a -> s{_cdersFailureReason = a});
cdersEndpointName :: Lens' CreateDevEndpointResponse (Maybe Text)
cdersEndpointName = lens _cdersEndpointName (\ s a -> s{_cdersEndpointName = a});
cdersExtraPythonLibsS3Path :: Lens' CreateDevEndpointResponse (Maybe Text)
cdersExtraPythonLibsS3Path = lens _cdersExtraPythonLibsS3Path (\ s a -> s{_cdersExtraPythonLibsS3Path = a});
cdersSecurityGroupIds :: Lens' CreateDevEndpointResponse [Text]
cdersSecurityGroupIds = lens _cdersSecurityGroupIds (\ s a -> s{_cdersSecurityGroupIds = a}) . _Default . _Coerce;
cdersVPCId :: Lens' CreateDevEndpointResponse (Maybe Text)
cdersVPCId = lens _cdersVPCId (\ s a -> s{_cdersVPCId = a});
cdersSubnetId :: Lens' CreateDevEndpointResponse (Maybe Text)
cdersSubnetId = lens _cdersSubnetId (\ s a -> s{_cdersSubnetId = a});
cdersNumberOfNodes :: Lens' CreateDevEndpointResponse (Maybe Int)
cdersNumberOfNodes = lens _cdersNumberOfNodes (\ s a -> s{_cdersNumberOfNodes = a});
cdersAvailabilityZone :: Lens' CreateDevEndpointResponse (Maybe Text)
cdersAvailabilityZone = lens _cdersAvailabilityZone (\ s a -> s{_cdersAvailabilityZone = a});
cdersZeppelinRemoteSparkInterpreterPort :: Lens' CreateDevEndpointResponse (Maybe Int)
cdersZeppelinRemoteSparkInterpreterPort = lens _cdersZeppelinRemoteSparkInterpreterPort (\ s a -> s{_cdersZeppelinRemoteSparkInterpreterPort = a});
cdersExtraJARsS3Path :: Lens' CreateDevEndpointResponse (Maybe Text)
cdersExtraJARsS3Path = lens _cdersExtraJARsS3Path (\ s a -> s{_cdersExtraJARsS3Path = a});
cdersCreatedTimestamp :: Lens' CreateDevEndpointResponse (Maybe UTCTime)
cdersCreatedTimestamp = lens _cdersCreatedTimestamp (\ s a -> s{_cdersCreatedTimestamp = a}) . mapping _Time;
cdersYarnEndpointAddress :: Lens' CreateDevEndpointResponse (Maybe Text)
cdersYarnEndpointAddress = lens _cdersYarnEndpointAddress (\ s a -> s{_cdersYarnEndpointAddress = a});
cdersRoleARN :: Lens' CreateDevEndpointResponse (Maybe Text)
cdersRoleARN = lens _cdersRoleARN (\ s a -> s{_cdersRoleARN = a});
cdersResponseStatus :: Lens' CreateDevEndpointResponse Int
cdersResponseStatus = lens _cdersResponseStatus (\ s a -> s{_cdersResponseStatus = a});
instance NFData CreateDevEndpointResponse where