Dev Endpoint
Provides a Glue Development Endpoint resource.
Example Usage
Basic usage:
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.iam.getPolicyDocument({
statements: [{
actions: ["sts:AssumeRole"],
principals: [{
type: "Service",
identifiers: ["glue.amazonaws.com"],
}],
}],
});
const exampleRole = new aws.iam.Role("example", {
name: "AWSGlueServiceRole-foo",
assumeRolePolicy: example.then(example => example.json),
});
const exampleDevEndpoint = new aws.glue.DevEndpoint("example", {
name: "foo",
roleArn: exampleRole.arn,
});
const example_AWSGlueServiceRole = new aws.iam.RolePolicyAttachment("example-AWSGlueServiceRole", {
policyArn: "arn:aws:iam::aws:policy/service-role/AWSGlueServiceRole",
role: exampleRole.name,
});
import pulumi
import pulumi_aws as aws
example = aws.iam.get_policy_document(statements=[{
"actions": ["sts:AssumeRole"],
"principals": [{
"type": "Service",
"identifiers": ["glue.amazonaws.com"],
}],
}])
example_role = aws.iam.Role("example",
name="AWSGlueServiceRole-foo",
assume_role_policy=example.json)
example_dev_endpoint = aws.glue.DevEndpoint("example",
name="foo",
role_arn=example_role.arn)
example__aws_glue_service_role = aws.iam.RolePolicyAttachment("example-AWSGlueServiceRole",
policy_arn="arn:aws:iam::aws:policy/service-role/AWSGlueServiceRole",
role=example_role.name)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.Iam.GetPolicyDocument.Invoke(new()
{
Statements = new[]
{
new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
{
Actions = new[]
{
"sts:AssumeRole",
},
Principals = new[]
{
new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs
{
Type = "Service",
Identifiers = new[]
{
"glue.amazonaws.com",
},
},
},
},
},
});
var exampleRole = new Aws.Iam.Role("example", new()
{
Name = "AWSGlueServiceRole-foo",
AssumeRolePolicy = example.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
});
var exampleDevEndpoint = new Aws.Glue.DevEndpoint("example", new()
{
Name = "foo",
RoleArn = exampleRole.Arn,
});
var example_AWSGlueServiceRole = new Aws.Iam.RolePolicyAttachment("example-AWSGlueServiceRole", new()
{
PolicyArn = "arn:aws:iam::aws:policy/service-role/AWSGlueServiceRole",
Role = exampleRole.Name,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/glue"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
Statements: []iam.GetPolicyDocumentStatement{
{
Actions: []string{
"sts:AssumeRole",
},
Principals: []iam.GetPolicyDocumentStatementPrincipal{
{
Type: "Service",
Identifiers: []string{
"glue.amazonaws.com",
},
},
},
},
},
}, nil)
if err != nil {
return err
}
exampleRole, err := iam.NewRole(ctx, "example", &iam.RoleArgs{
Name: pulumi.String("AWSGlueServiceRole-foo"),
AssumeRolePolicy: pulumi.String(example.Json),
})
if err != nil {
return err
}
_, err = glue.NewDevEndpoint(ctx, "example", &glue.DevEndpointArgs{
Name: pulumi.String("foo"),
RoleArn: exampleRole.Arn,
})
if err != nil {
return err
}
_, err = iam.NewRolePolicyAttachment(ctx, "example-AWSGlueServiceRole", &iam.RolePolicyAttachmentArgs{
PolicyArn: pulumi.String("arn:aws:iam::aws:policy/service-role/AWSGlueServiceRole"),
Role: exampleRole.Name,
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.iam.IamFunctions;
import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
import com.pulumi.aws.iam.Role;
import com.pulumi.aws.iam.RoleArgs;
import com.pulumi.aws.glue.DevEndpoint;
import com.pulumi.aws.glue.DevEndpointArgs;
import com.pulumi.aws.iam.RolePolicyAttachment;
import com.pulumi.aws.iam.RolePolicyAttachmentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
.statements(GetPolicyDocumentStatementArgs.builder()
.actions("sts:AssumeRole")
.principals(GetPolicyDocumentStatementPrincipalArgs.builder()
.type("Service")
.identifiers("glue.amazonaws.com")
.build())
.build())
.build());
var exampleRole = new Role("exampleRole", RoleArgs.builder()
.name("AWSGlueServiceRole-foo")
.assumeRolePolicy(example.json())
.build());
var exampleDevEndpoint = new DevEndpoint("exampleDevEndpoint", DevEndpointArgs.builder()
.name("foo")
.roleArn(exampleRole.arn())
.build());
var example_AWSGlueServiceRole = new RolePolicyAttachment("example-AWSGlueServiceRole", RolePolicyAttachmentArgs.builder()
.policyArn("arn:aws:iam::aws:policy/service-role/AWSGlueServiceRole")
.role(exampleRole.name())
.build());
}
}
resources:
exampleDevEndpoint:
type: aws:glue:DevEndpoint
name: example
properties:
name: foo
roleArn: ${exampleRole.arn}
exampleRole:
type: aws:iam:Role
name: example
properties:
name: AWSGlueServiceRole-foo
assumeRolePolicy: ${example.json}
example-AWSGlueServiceRole:
type: aws:iam:RolePolicyAttachment
properties:
policyArn: arn:aws:iam::aws:policy/service-role/AWSGlueServiceRole
role: ${exampleRole.name}
variables:
example:
fn::invoke:
function: aws:iam:getPolicyDocument
arguments:
statements:
- actions:
- sts:AssumeRole
principals:
- type: Service
identifiers:
- glue.amazonaws.com
Import
Using pulumi import
, import a Glue Development Endpoint using the name
. For example:
$ pulumi import aws:glue/devEndpoint:DevEndpoint example foo
Properties
The AWS availability zone where this endpoint is located.
Path to one or more Java Jars in an S3 bucket that should be loaded in this endpoint.
Path(s) to one or more Python libraries in an S3 bucket that should be loaded in this endpoint. Multiple values must be complete paths separated by a comma.
The reason for a current failure in this endpoint.
Specifies the versions of Python and Apache Spark to use. Defaults to AWS Glue version 0.9.
The number of AWS Glue Data Processing Units (DPUs) to allocate to this endpoint. Conflicts with worker_type
.
The number of workers of a defined worker type that are allocated to this endpoint. This field is available only when you choose worker type G.1X or G.2X.
A private IP address to access the endpoint within a VPC, if this endpoint is created within one.
The public IP address used by this endpoint. The PublicAddress field is present only when you create a non-VPC endpoint.
A list of public keys to be used by this endpoint for authentication.
The name of the Security Configuration structure to be used with this endpoint.
Security group IDs for the security groups to be used by this endpoint.
The type of predefined worker that is allocated to this endpoint. Accepts a value of Standard, G.1X, or G.2X.
The YARN endpoint address used by this endpoint.
The Apache Zeppelin port for the remote Apache Spark interpreter.