emrserverless

package module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2022 License: Apache-2.0 Imports: 34 Imported by: 8

Documentation

Overview

Package emrserverless provides the API client, operations, and parameter types for EMR Serverless.

Amazon EMR Serverless is a new deployment option for Amazon EMR. EMR Serverless provides a serverless runtime environment that simplifies running analytics applications using the latest open source frameworks such as Apache Spark and Apache Hive. With EMR Serverless, you don’t have to configure, optimize, secure, or operate clusters to run applications with these frameworks. The API reference to Amazon EMR Serverless is emr-serverless. The emr-serverless prefix is used in the following scenarios:

* It is the prefix in the CLI commands for Amazon EMR Serverless. For example, aws emr-serverless start-job-run.

* It is the prefix before IAM policy actions for Amazon EMR Serverless. For example, "Action": ["emr-serverless:StartJobRun"]. For more information, see Policy actions for Amazon EMR Serverless (https://docs.aws.amazon.com/emr/latest/EMR-Serverless-UserGuide/security_iam_service-with-iam.html#security_iam_service-with-iam-id-based-policies-actions).

* It is the prefix used in Amazon EMR Serverless service endpoints. For example, emr-serverless.us-east-2.amazonaws.com.

Index

Constants

View Source
const ServiceAPIVersion = "2021-07-13"
View Source
const ServiceID = "EMR Serverless"

Variables

This section is empty.

Functions

func NewDefaultEndpointResolver

func NewDefaultEndpointResolver() *internalendpoints.Resolver

NewDefaultEndpointResolver constructs a new service endpoint resolver

func WithAPIOptions

func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options)

WithAPIOptions returns a functional option for setting the Client's APIOptions option.

func WithEndpointResolver

func WithEndpointResolver(v EndpointResolver) func(*Options)

WithEndpointResolver returns a functional option for setting the Client's EndpointResolver option.

Types

type CancelJobRunInput

type CancelJobRunInput struct {

	// The ID of the application on which the job run will be canceled.
	//
	// This member is required.
	ApplicationId *string

	// The ID of the job run to cancel.
	//
	// This member is required.
	JobRunId *string
	// contains filtered or unexported fields
}

type CancelJobRunOutput

type CancelJobRunOutput struct {

	// The output contains the application ID on which the job run is cancelled.
	//
	// This member is required.
	ApplicationId *string

	// The output contains the ID of the cancelled job run.
	//
	// This member is required.
	JobRunId *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides the API client to make operations call for EMR Serverless.

func New

func New(options Options, optFns ...func(*Options)) *Client

New returns an initialized Client based on the functional options. Provide additional functional options to further configure the behavior of the client, such as changing the client's endpoint or adding custom middleware behavior.

func NewFromConfig

func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client

NewFromConfig returns a new client from the provided config.

func (*Client) CancelJobRun

func (c *Client) CancelJobRun(ctx context.Context, params *CancelJobRunInput, optFns ...func(*Options)) (*CancelJobRunOutput, error)

Cancels a job run.

func (*Client) CreateApplication

func (c *Client) CreateApplication(ctx context.Context, params *CreateApplicationInput, optFns ...func(*Options)) (*CreateApplicationOutput, error)

Creates an application.

func (*Client) DeleteApplication

func (c *Client) DeleteApplication(ctx context.Context, params *DeleteApplicationInput, optFns ...func(*Options)) (*DeleteApplicationOutput, error)

Deletes an application. An application has to be in a stopped or created state in order to be deleted.

func (*Client) GetApplication

func (c *Client) GetApplication(ctx context.Context, params *GetApplicationInput, optFns ...func(*Options)) (*GetApplicationOutput, error)

Displays detailed information about a specified application.

func (*Client) GetJobRun

func (c *Client) GetJobRun(ctx context.Context, params *GetJobRunInput, optFns ...func(*Options)) (*GetJobRunOutput, error)

Displays detailed information about a job run.

func (*Client) ListApplications

func (c *Client) ListApplications(ctx context.Context, params *ListApplicationsInput, optFns ...func(*Options)) (*ListApplicationsOutput, error)

Lists applications based on a set of parameters.

func (*Client) ListJobRuns

func (c *Client) ListJobRuns(ctx context.Context, params *ListJobRunsInput, optFns ...func(*Options)) (*ListJobRunsOutput, error)

Lists job runs based on a set of parameters.

func (*Client) ListTagsForResource

func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error)

Lists the tags assigned to the resources.

func (*Client) StartApplication

func (c *Client) StartApplication(ctx context.Context, params *StartApplicationInput, optFns ...func(*Options)) (*StartApplicationOutput, error)

Starts a specified application and initializes initial capacity if configured.

func (*Client) StartJobRun

func (c *Client) StartJobRun(ctx context.Context, params *StartJobRunInput, optFns ...func(*Options)) (*StartJobRunOutput, error)

Starts a job run.

func (*Client) StopApplication

func (c *Client) StopApplication(ctx context.Context, params *StopApplicationInput, optFns ...func(*Options)) (*StopApplicationOutput, error)

Stops a specified application and releases initial capacity if configured. All scheduled and running jobs must be completed or cancelled before stopping an application.

func (*Client) TagResource

func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error)

Assigns tags to resources. A tag is a label that you assign to an AWS resource. Each tag consists of a key and an optional value, both of which you define. Tags enable you to categorize your AWS resources by attributes such as purpose, owner, or environment. When you have many resources of the same type, you can quickly identify a specific resource based on the tags you've assigned to it.

func (*Client) UntagResource

func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error)

Removes tags from resources.

func (*Client) UpdateApplication

func (c *Client) UpdateApplication(ctx context.Context, params *UpdateApplicationInput, optFns ...func(*Options)) (*UpdateApplicationOutput, error)

Updates a specified application. An application has to be in a stopped or created state in order to be updated.

type CreateApplicationInput

type CreateApplicationInput struct {

	// The client idempotency token of the application to create. Its value must be
	// unique for each request.
	//
	// This member is required.
	ClientToken *string

	// The EMR release version associated with the application.
	//
	// This member is required.
	ReleaseLabel *string

	// The type of application you want to start, such as Spark or Hive.
	//
	// This member is required.
	Type *string

	// The configuration for an application to automatically start on job submission.
	AutoStartConfiguration *types.AutoStartConfig

	// The configuration for an application to automatically stop after a certain
	// amount of time being idle.
	AutoStopConfiguration *types.AutoStopConfig

	// The capacity to initialize when the application is created.
	InitialCapacity map[string]types.InitialCapacityConfig

	// The maximum capacity to allocate when the application is created. This is
	// cumulative across all workers at any given point in time, not just when an
	// application is created. No new resources will be created once any one of the
	// defined limits is hit.
	MaximumCapacity *types.MaximumAllowedResources

	// The name of the application.
	Name *string

	// The network configuration for customer VPC connectivity.
	NetworkConfiguration *types.NetworkConfiguration

	// The tags assigned to the application.
	Tags map[string]string
	// contains filtered or unexported fields
}

type CreateApplicationOutput

type CreateApplicationOutput struct {

	// The output contains the application ID.
	//
	// This member is required.
	ApplicationId *string

	// The output contains the ARN of the application.
	//
	// This member is required.
	Arn *string

	// The output contains the name of the application.
	Name *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type DeleteApplicationInput

type DeleteApplicationInput struct {

	// The ID of the application that will be deleted.
	//
	// This member is required.
	ApplicationId *string
	// contains filtered or unexported fields
}

type DeleteApplicationOutput

type DeleteApplicationOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type EndpointResolver

type EndpointResolver interface {
	ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
}

EndpointResolver interface for resolving service endpoints.

func EndpointResolverFromURL

func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver

EndpointResolverFromURL returns an EndpointResolver configured using the provided endpoint url. By default, the resolved endpoint resolver uses the client region as signing region, and the endpoint source is set to EndpointSourceCustom.You can provide functional options to configure endpoint values for the resolved endpoint.

type EndpointResolverFunc

type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)

EndpointResolverFunc is a helper utility that wraps a function so it satisfies the EndpointResolver interface. This is useful when you want to add additional endpoint resolving logic, or stub out specific endpoints with custom values.

func (EndpointResolverFunc) ResolveEndpoint

func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error)

type EndpointResolverOptions

type EndpointResolverOptions = internalendpoints.Options

EndpointResolverOptions is the service endpoint resolver options

type GetApplicationInput

type GetApplicationInput struct {

	// The ID of the application that will be described.
	//
	// This member is required.
	ApplicationId *string
	// contains filtered or unexported fields
}

type GetApplicationOutput

type GetApplicationOutput struct {

	// The output displays information about the specified application.
	//
	// This member is required.
	Application *types.Application

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type GetJobRunInput

type GetJobRunInput struct {

	// The ID of the application on which the job run is submitted.
	//
	// This member is required.
	ApplicationId *string

	// The ID of the job run.
	//
	// This member is required.
	JobRunId *string
	// contains filtered or unexported fields
}

type GetJobRunOutput

type GetJobRunOutput struct {

	// The output displays information about the job run.
	//
	// This member is required.
	JobRun *types.JobRun

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type HTTPClient

type HTTPClient interface {
	Do(*http.Request) (*http.Response, error)
}

type HTTPSignerV4

type HTTPSignerV4 interface {
	SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error
}

type IdempotencyTokenProvider

type IdempotencyTokenProvider interface {
	GetIdempotencyToken() (string, error)
}

IdempotencyTokenProvider interface for providing idempotency token

type ListApplicationsAPIClient

type ListApplicationsAPIClient interface {
	ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error)
}

ListApplicationsAPIClient is a client that implements the ListApplications operation.

type ListApplicationsInput

type ListApplicationsInput struct {

	// The maximum number of applications that can be listed.
	MaxResults *int32

	// The token for the next set of application results.
	NextToken *string

	// An optional filter for application states. Note that if this filter contains
	// multiple states, the resulting list will be grouped by the state.
	States []types.ApplicationState
	// contains filtered or unexported fields
}

type ListApplicationsOutput

type ListApplicationsOutput struct {

	// The output lists the specified applications.
	//
	// This member is required.
	Applications []types.ApplicationSummary

	// The output displays the token for the next set of application results. This is
	// required for pagination and is available as a response of the previous request.
	NextToken *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type ListApplicationsPaginator

type ListApplicationsPaginator struct {
	// contains filtered or unexported fields
}

ListApplicationsPaginator is a paginator for ListApplications

func NewListApplicationsPaginator

func NewListApplicationsPaginator(client ListApplicationsAPIClient, params *ListApplicationsInput, optFns ...func(*ListApplicationsPaginatorOptions)) *ListApplicationsPaginator

NewListApplicationsPaginator returns a new ListApplicationsPaginator

func (*ListApplicationsPaginator) HasMorePages

func (p *ListApplicationsPaginator) HasMorePages() bool

HasMorePages returns a boolean indicating whether more pages are available

func (*ListApplicationsPaginator) NextPage

func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListApplicationsOutput, error)

NextPage retrieves the next ListApplications page.

type ListApplicationsPaginatorOptions

type ListApplicationsPaginatorOptions struct {
	// The maximum number of applications that can be listed.
	Limit int32

	// Set to true if pagination should stop if the service returns a pagination token
	// that matches the most recent token provided to the service.
	StopOnDuplicateToken bool
}

ListApplicationsPaginatorOptions is the paginator options for ListApplications

type ListJobRunsAPIClient

type ListJobRunsAPIClient interface {
	ListJobRuns(context.Context, *ListJobRunsInput, ...func(*Options)) (*ListJobRunsOutput, error)
}

ListJobRunsAPIClient is a client that implements the ListJobRuns operation.

type ListJobRunsInput

type ListJobRunsInput struct {

	// The ID of the application for which to list the job run.
	//
	// This member is required.
	ApplicationId *string

	// The lower bound of the option to filter by creation date and time.
	CreatedAtAfter *time.Time

	// The upper bound of the option to filter by creation date and time.
	CreatedAtBefore *time.Time

	// The maximum number of job runs that can be listed.
	MaxResults *int32

	// The token for the next set of job run results.
	NextToken *string

	// An optional filter for job run states. Note that if this filter contains
	// multiple states, the resulting list will be grouped by the state.
	States []types.JobRunState
	// contains filtered or unexported fields
}

type ListJobRunsOutput

type ListJobRunsOutput struct {

	// The output lists information about the specified job runs.
	//
	// This member is required.
	JobRuns []types.JobRunSummary

	// The output displays the token for the next set of job run results. This is
	// required for pagination and is available as a response of the previous request.
	NextToken *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type ListJobRunsPaginator

type ListJobRunsPaginator struct {
	// contains filtered or unexported fields
}

ListJobRunsPaginator is a paginator for ListJobRuns

func NewListJobRunsPaginator

func NewListJobRunsPaginator(client ListJobRunsAPIClient, params *ListJobRunsInput, optFns ...func(*ListJobRunsPaginatorOptions)) *ListJobRunsPaginator

NewListJobRunsPaginator returns a new ListJobRunsPaginator

func (*ListJobRunsPaginator) HasMorePages

func (p *ListJobRunsPaginator) HasMorePages() bool

HasMorePages returns a boolean indicating whether more pages are available

func (*ListJobRunsPaginator) NextPage

func (p *ListJobRunsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListJobRunsOutput, error)

NextPage retrieves the next ListJobRuns page.

type ListJobRunsPaginatorOptions

type ListJobRunsPaginatorOptions struct {
	// The maximum number of job runs that can be listed.
	Limit int32

	// Set to true if pagination should stop if the service returns a pagination token
	// that matches the most recent token provided to the service.
	StopOnDuplicateToken bool
}

ListJobRunsPaginatorOptions is the paginator options for ListJobRuns

type ListTagsForResourceInput

type ListTagsForResourceInput struct {

	// The Amazon Resource Name (ARN) that identifies the resource to list the tags
	// for. Currently, the supported resources are Amazon EMR Serverless applications
	// and job runs.
	//
	// This member is required.
	ResourceArn *string
	// contains filtered or unexported fields
}

type ListTagsForResourceOutput

type ListTagsForResourceOutput struct {

	// The tags for the resource.
	Tags map[string]string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type Options

type Options struct {
	// Set of options to modify how an operation is invoked. These apply to all
	// operations invoked for this client. Use functional options on operation call to
	// modify this list for per operation behavior.
	APIOptions []func(*middleware.Stack) error

	// Configures the events that will be sent to the configured logger.
	ClientLogMode aws.ClientLogMode

	// The credentials object to use when signing requests.
	Credentials aws.CredentialsProvider

	// The configuration DefaultsMode that the SDK should use when constructing the
	// clients initial default settings.
	DefaultsMode aws.DefaultsMode

	// The endpoint options to be used when attempting to resolve an endpoint.
	EndpointOptions EndpointResolverOptions

	// The service endpoint resolver.
	EndpointResolver EndpointResolver

	// Signature Version 4 (SigV4) Signer
	HTTPSignerV4 HTTPSignerV4

	// Provides idempotency tokens values that will be automatically populated into
	// idempotent API operations.
	IdempotencyTokenProvider IdempotencyTokenProvider

	// The logger writer interface to write logging messages to.
	Logger logging.Logger

	// The region to send requests to. (Required)
	Region string

	// RetryMaxAttempts specifies the maximum number attempts an API client will call
	// an operation that fails with a retryable error. A value of 0 is ignored, and
	// will not be used to configure the API client created default retryer, or modify
	// per operation call's retry max attempts. When creating a new API Clients this
	// member will only be used if the Retryer Options member is nil. This value will
	// be ignored if Retryer is not nil. If specified in an operation call's functional
	// options with a value that is different than the constructed client's Options,
	// the Client's Retryer will be wrapped to use the operation's specific
	// RetryMaxAttempts value.
	RetryMaxAttempts int

	// RetryMode specifies the retry mode the API client will be created with, if
	// Retryer option is not also specified. When creating a new API Clients this
	// member will only be used if the Retryer Options member is nil. This value will
	// be ignored if Retryer is not nil. Currently does not support per operation call
	// overrides, may in the future.
	RetryMode aws.RetryMode

	// Retryer guides how HTTP requests should be retried in case of recoverable
	// failures. When nil the API client will use a default retryer. The kind of
	// default retry created by the API client can be changed with the RetryMode
	// option.
	Retryer aws.Retryer

	// The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
	// to DefaultsModeAuto and is initialized using config.LoadDefaultConfig. You
	// should not populate this structure programmatically, or rely on the values here
	// within your applications.
	RuntimeEnvironment aws.RuntimeEnvironment

	// The HTTP client to invoke API calls with. Defaults to client's default HTTP
	// implementation if nil.
	HTTPClient HTTPClient
	// contains filtered or unexported fields
}

func (Options) Copy

func (o Options) Copy() Options

Copy creates a clone where the APIOptions list is deep copied.

type ResolveEndpoint

type ResolveEndpoint struct {
	Resolver EndpointResolver
	Options  EndpointResolverOptions
}

func (*ResolveEndpoint) HandleSerialize

func (*ResolveEndpoint) ID

func (*ResolveEndpoint) ID() string

type StartApplicationInput

type StartApplicationInput struct {

	// The ID of the application to start.
	//
	// This member is required.
	ApplicationId *string
	// contains filtered or unexported fields
}

type StartApplicationOutput

type StartApplicationOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type StartJobRunInput

type StartJobRunInput struct {

	// The ID of the application on which to run the job.
	//
	// This member is required.
	ApplicationId *string

	// The client idempotency token of the job run to start. Its value must be unique
	// for each request.
	//
	// This member is required.
	ClientToken *string

	// The execution role ARN for the job run.
	//
	// This member is required.
	ExecutionRoleArn *string

	// The configuration overrides for the job run.
	ConfigurationOverrides *types.ConfigurationOverrides

	// The maximum duration for the job run to run. If the job run runs beyond this
	// duration, it will be automatically cancelled.
	ExecutionTimeoutMinutes int64

	// The job driver for the job run.
	JobDriver types.JobDriver

	// The optional job run name. This doesn't have to be unique.
	Name *string

	// The tags assigned to the job run.
	Tags map[string]string
	// contains filtered or unexported fields
}

type StartJobRunOutput

type StartJobRunOutput struct {

	// This output displays the application ID on which the job run was submitted.
	//
	// This member is required.
	ApplicationId *string

	// The output lists the execution role ARN of the job run.
	//
	// This member is required.
	Arn *string

	// The output contains the ID of the started job run.
	//
	// This member is required.
	JobRunId *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type StopApplicationInput

type StopApplicationInput struct {

	// The ID of the application to stop.
	//
	// This member is required.
	ApplicationId *string
	// contains filtered or unexported fields
}

type StopApplicationOutput

type StopApplicationOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type TagResourceInput

type TagResourceInput struct {

	// The Amazon Resource Name (ARN) that identifies the resource to list the tags
	// for. Currently, the supported resources are Amazon EMR Serverless applications
	// and job runs.
	//
	// This member is required.
	ResourceArn *string

	// The tags to add to the resource. A tag is an array of key-value pairs.
	//
	// This member is required.
	Tags map[string]string
	// contains filtered or unexported fields
}

type TagResourceOutput

type TagResourceOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type UntagResourceInput

type UntagResourceInput struct {

	// The Amazon Resource Name (ARN) that identifies the resource to list the tags
	// for. Currently, the supported resources are Amazon EMR Serverless applications
	// and job runs.
	//
	// This member is required.
	ResourceArn *string

	// The keys of the tags to be removed.
	//
	// This member is required.
	TagKeys []string
	// contains filtered or unexported fields
}

type UntagResourceOutput

type UntagResourceOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type UpdateApplicationInput

type UpdateApplicationInput struct {

	// The ID of the application to update.
	//
	// This member is required.
	ApplicationId *string

	// The client idempotency token of the application to update. Its value must be
	// unique for each request.
	//
	// This member is required.
	ClientToken *string

	// The configuration for an application to automatically start on job submission.
	AutoStartConfiguration *types.AutoStartConfig

	// The configuration for an application to automatically stop after a certain
	// amount of time being idle.
	AutoStopConfiguration *types.AutoStopConfig

	// The capacity to initialize when the application is updated.
	InitialCapacity map[string]types.InitialCapacityConfig

	// The maximum capacity to allocate when the application is updated. This is
	// cumulative across all workers at any given point in time during the lifespan of
	// the application. No new resources will be created once any one of the defined
	// limits is hit.
	MaximumCapacity *types.MaximumAllowedResources

	// The network configuration for customer VPC connectivity.
	NetworkConfiguration *types.NetworkConfiguration
	// contains filtered or unexported fields
}

type UpdateApplicationOutput

type UpdateApplicationOutput struct {

	// Information about the updated application.
	//
	// This member is required.
	Application *types.Application

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL