1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288
|
// Code generated by smithy-go-codegen DO NOT EDIT.
package glue
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/glue/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Creates a new development endpoint.
func (c *Client) CreateDevEndpoint(ctx context.Context, params *CreateDevEndpointInput, optFns ...func(*Options)) (*CreateDevEndpointOutput, error) {
if params == nil {
params = &CreateDevEndpointInput{}
}
result, metadata, err := c.invokeOperation(ctx, "CreateDevEndpoint", params, optFns, c.addOperationCreateDevEndpointMiddlewares)
if err != nil {
return nil, err
}
out := result.(*CreateDevEndpointOutput)
out.ResultMetadata = metadata
return out, nil
}
type CreateDevEndpointInput struct {
// The name to be assigned to the new DevEndpoint .
//
// This member is required.
EndpointName *string
// The IAM role for the DevEndpoint .
//
// This member is required.
RoleArn *string
// A map of arguments used to configure the DevEndpoint .
Arguments map[string]string
// The path to one or more Java .jar files in an S3 bucket that should be loaded
// in your DevEndpoint .
ExtraJarsS3Path *string
// The paths to one or more Python libraries in an Amazon S3 bucket that should be
// loaded in your DevEndpoint . Multiple values must be complete paths separated by
// a comma. You can only use pure Python libraries with a DevEndpoint . Libraries
// that rely on C extensions, such as the pandas (http://pandas.pydata.org/)
// Python data analysis library, are not yet supported.
ExtraPythonLibsS3Path *string
// Glue version determines the versions of Apache Spark and Python that Glue
// supports. The Python version indicates the version supported for running your
// ETL scripts on development endpoints. For more information about the available
// Glue versions and corresponding Spark and Python versions, see Glue version (https://docs.aws.amazon.com/glue/latest/dg/add-job.html)
// in the developer guide. Development endpoints that are created without
// specifying a Glue version default to Glue 0.9. You can specify a version of
// Python support for development endpoints by using the Arguments parameter in
// the CreateDevEndpoint or UpdateDevEndpoint APIs. If no arguments are provided,
// the version defaults to Python 2.
GlueVersion *string
// The number of Glue Data Processing Units (DPUs) to allocate to this DevEndpoint .
NumberOfNodes int32
// The number of workers of a defined workerType that are allocated to the
// development endpoint. The maximum number of workers you can define are 299 for
// G.1X , and 149 for G.2X .
NumberOfWorkers *int32
// The public key to be used by this DevEndpoint for authentication. This
// attribute is provided for backward compatibility because the recommended
// attribute to use is public keys.
PublicKey *string
// A list of public keys to be used by the development endpoints for
// authentication. The use of this attribute is preferred over a single public key
// because the public keys allow you to have a different private key per client. If
// you previously created an endpoint with a public key, you must remove that key
// to be able to set a list of public keys. Call the UpdateDevEndpoint API with
// the public key content in the deletePublicKeys attribute, and the list of new
// keys in the addPublicKeys attribute.
PublicKeys []string
// The name of the SecurityConfiguration structure to be used with this DevEndpoint
// .
SecurityConfiguration *string
// Security group IDs for the security groups to be used by the new DevEndpoint .
SecurityGroupIds []string
// The subnet ID for the new DevEndpoint to use.
SubnetId *string
// The tags to use with this DevEndpoint. You may use tags to limit access to the
// DevEndpoint. For more information about tags in Glue, see Amazon Web Services
// Tags in Glue (https://docs.aws.amazon.com/glue/latest/dg/monitor-tags.html) in
// the developer guide.
Tags map[string]string
// The type of predefined worker that is allocated to the development endpoint.
// Accepts a value of Standard, G.1X, or G.2X.
// - For the Standard worker type, each worker provides 4 vCPU, 16 GB of memory
// and a 50GB disk, and 2 executors per worker.
// - For the G.1X worker type, each worker maps to 1 DPU (4 vCPU, 16 GB of
// memory, 64 GB disk), and provides 1 executor per worker. We recommend this
// worker type for memory-intensive jobs.
// - For the G.2X worker type, each worker maps to 2 DPU (8 vCPU, 32 GB of
// memory, 128 GB disk), and provides 1 executor per worker. We recommend this
// worker type for memory-intensive jobs.
// Known issue: when a development endpoint is created with the G.2X WorkerType
// configuration, the Spark drivers for the development endpoint will run on 4
// vCPU, 16 GB of memory, and a 64 GB disk.
WorkerType types.WorkerType
noSmithyDocumentSerde
}
type CreateDevEndpointOutput struct {
// The map of arguments used to configure this DevEndpoint . Valid arguments are:
// - "--enable-glue-datacatalog": ""
// You can specify a version of Python support for development endpoints by using
// the Arguments parameter in the CreateDevEndpoint or UpdateDevEndpoint APIs. If
// no arguments are provided, the version defaults to Python 2.
Arguments map[string]string
// The Amazon Web Services Availability Zone where this DevEndpoint is located.
AvailabilityZone *string
// The point in time at which this DevEndpoint was created.
CreatedTimestamp *time.Time
// The name assigned to the new DevEndpoint .
EndpointName *string
// Path to one or more Java .jar files in an S3 bucket that will be loaded in your
// DevEndpoint .
ExtraJarsS3Path *string
// The paths to one or more Python libraries in an S3 bucket that will be loaded
// in your DevEndpoint .
ExtraPythonLibsS3Path *string
// The reason for a current failure in this DevEndpoint .
FailureReason *string
// Glue version determines the versions of Apache Spark and Python that Glue
// supports. The Python version indicates the version supported for running your
// ETL scripts on development endpoints. For more information about the available
// Glue versions and corresponding Spark and Python versions, see Glue version (https://docs.aws.amazon.com/glue/latest/dg/add-job.html)
// in the developer guide.
GlueVersion *string
// The number of Glue Data Processing Units (DPUs) allocated to this DevEndpoint.
NumberOfNodes int32
// The number of workers of a defined workerType that are allocated to the
// development endpoint.
NumberOfWorkers *int32
// The Amazon Resource Name (ARN) of the role assigned to the new DevEndpoint .
RoleArn *string
// The name of the SecurityConfiguration structure being used with this DevEndpoint
// .
SecurityConfiguration *string
// The security groups assigned to the new DevEndpoint .
SecurityGroupIds []string
// The current status of the new DevEndpoint .
Status *string
// The subnet ID assigned to the new DevEndpoint .
SubnetId *string
// The ID of the virtual private cloud (VPC) used by this DevEndpoint .
VpcId *string
// The type of predefined worker that is allocated to the development endpoint.
// May be a value of Standard, G.1X, or G.2X.
WorkerType types.WorkerType
// The address of the YARN endpoint used by this DevEndpoint .
YarnEndpointAddress *string
// The Apache Zeppelin port for the remote Apache Spark interpreter.
ZeppelinRemoteSparkInterpreterPort int32
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationCreateDevEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) {
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
return err
}
err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateDevEndpoint{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateDevEndpoint{}, middleware.After)
if err != nil {
return err
}
if err := addProtocolFinalizerMiddlewares(stack, options, "CreateDevEndpoint"); err != nil {
return fmt.Errorf("add protocol finalizers: %v", err)
}
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
return err
}
if err = addOpCreateDevEndpointValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDevEndpoint(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opCreateDevEndpoint(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
OperationName: "CreateDevEndpoint",
}
}
|