Learn R Programming

paws.compute (version 0.7.0)

ecs: Amazon EC2 Container Service

Description

Amazon Elastic Container Service

Amazon Elastic Container Service (Amazon ECS) is a highly scalable, fast, container management service. It makes it easy to run, stop, and manage Docker containers. You can host your cluster on a serverless infrastructure that's managed by Amazon ECS by launching your services or tasks on Fargate. For more control, you can host your tasks on a cluster of Amazon Elastic Compute Cloud (Amazon EC2) or External (on-premises) instances that you manage.

Amazon ECS makes it easy to launch and stop container-based applications with simple API calls. This makes it easy to get the state of your cluster from a centralized service, and gives you access to many familiar Amazon EC2 features.

You can use Amazon ECS to schedule the placement of containers across your cluster based on your resource needs, isolation policies, and availability requirements. With Amazon ECS, you don't need to operate your own cluster management and configuration management systems. You also don't need to worry about scaling your management infrastructure.

Usage

ecs(config = list(), credentials = list(), endpoint = NULL, region = NULL)

Value

A client for the service. You can call the service's operations using syntax like svc$operation(...), where svc is the name you've assigned to the client. The available operations are listed in the Operations section.

Arguments

config

Optional configuration of credentials, endpoint, and/or region.

  • credentials:

    • creds:

      • access_key_id: AWS access key ID

      • secret_access_key: AWS secret access key

      • session_token: AWS temporary session token

    • profile: The name of a profile to use. If not given, then the default profile is used.

    • anonymous: Set anonymous credentials.

  • endpoint: The complete URL to use for the constructed client.

  • region: The AWS Region used in instantiating the client.

  • close_connection: Immediately close all HTTP connections.

  • timeout: The time in seconds till a timeout exception is thrown when attempting to make a connection. The default is 60 seconds.

  • s3_force_path_style: Set this to true to force the request to use path-style addressing, i.e. http://s3.amazonaws.com/BUCKET/KEY.

  • sts_regional_endpoint: Set sts regional endpoint resolver to regional or legacy https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html

credentials

Optional credentials shorthand for the config parameter

  • creds:

    • access_key_id: AWS access key ID

    • secret_access_key: AWS secret access key

    • session_token: AWS temporary session token

  • profile: The name of a profile to use. If not given, then the default profile is used.

  • anonymous: Set anonymous credentials.

endpoint

Optional shorthand for complete URL to use for the constructed client.

region

Optional shorthand for AWS Region used in instantiating the client.

Service syntax

svc <- ecs(
  config = list(
    credentials = list(
      creds = list(
        access_key_id = "string",
        secret_access_key = "string",
        session_token = "string"
      ),
      profile = "string",
      anonymous = "logical"
    ),
    endpoint = "string",
    region = "string",
    close_connection = "logical",
    timeout = "numeric",
    s3_force_path_style = "logical",
    sts_regional_endpoint = "string"
  ),
  credentials = list(
    creds = list(
      access_key_id = "string",
      secret_access_key = "string",
      session_token = "string"
    ),
    profile = "string",
    anonymous = "logical"
  ),
  endpoint = "string",
  region = "string"
)

Operations

create_capacity_providerCreates a new capacity provider
create_clusterCreates a new Amazon ECS cluster
create_serviceRuns and maintains your desired number of tasks from a specified task definition
create_task_setCreate a task set in the specified cluster and service
delete_account_settingDisables an account setting for a specified user, role, or the root user for an account
delete_attributesDeletes one or more custom attributes from an Amazon ECS resource
delete_capacity_providerDeletes the specified capacity provider
delete_clusterDeletes the specified cluster
delete_serviceDeletes a specified service within a cluster
delete_task_definitionsDeletes one or more task definitions
delete_task_setDeletes a specified task set within a service
deregister_container_instanceDeregisters an Amazon ECS container instance from the specified cluster
deregister_task_definitionDeregisters the specified task definition by family and revision
describe_capacity_providersDescribes one or more of your capacity providers
describe_clustersDescribes one or more of your clusters
describe_container_instancesDescribes one or more container instances
describe_servicesDescribes the specified services running in your cluster
describe_task_definitionDescribes a task definition
describe_tasksDescribes a specified task or tasks
describe_task_setsDescribes the task sets in the specified cluster and service
discover_poll_endpointThis action is only used by the Amazon ECS agent, and it is not intended for use outside of the agent
execute_commandRuns a command remotely on a container within a task
get_task_protectionRetrieves the protection status of tasks in an Amazon ECS service
list_account_settingsLists the account settings for a specified principal
list_attributesLists the attributes for Amazon ECS resources within a specified target type and cluster
list_clustersReturns a list of existing clusters
list_container_instancesReturns a list of container instances in a specified cluster
list_servicesReturns a list of services
list_services_by_namespaceThis operation lists all of the services that are associated with a Cloud Map namespace
list_tags_for_resourceList the tags for an Amazon ECS resource
list_task_definition_familiesReturns a list of task definition families that are registered to your account
list_task_definitionsReturns a list of task definitions that are registered to your account
list_tasksReturns a list of tasks
put_account_settingModifies an account setting
put_account_setting_defaultModifies an account setting for all users on an account for whom no individual account setting has been specified
put_attributesCreate or update an attribute on an Amazon ECS resource
put_cluster_capacity_providersModifies the available capacity providers and the default capacity provider strategy for a cluster
register_container_instanceThis action is only used by the Amazon ECS agent, and it is not intended for use outside of the agent
register_task_definitionRegisters a new task definition from the supplied family and containerDefinitions
run_taskStarts a new task using the specified task definition
start_taskStarts a new task from the specified task definition on the specified container instance or instances
stop_taskStops a running task
submit_attachment_state_changesThis action is only used by the Amazon ECS agent, and it is not intended for use outside of the agent
submit_container_state_changeThis action is only used by the Amazon ECS agent, and it is not intended for use outside of the agent
submit_task_state_changeThis action is only used by the Amazon ECS agent, and it is not intended for use outside of the agent
tag_resourceAssociates the specified tags to a resource with the specified resourceArn
untag_resourceDeletes specified tags from a resource
update_capacity_providerModifies the parameters for a capacity provider
update_clusterUpdates the cluster
update_cluster_settingsModifies the settings to use for a cluster
update_container_agentUpdates the Amazon ECS container agent on a specified container instance
update_container_instances_stateModifies the status of an Amazon ECS container instance
update_serviceModifies the parameters of a service
update_service_primary_task_setModifies which task set in a service is the primary task set
update_task_protectionUpdates the protection status of a task
update_task_setModifies a task set

Examples

Run this code
if (FALSE) {
svc <- ecs()
# This example creates a cluster in your default region.
svc$create_cluster(
  clusterName = "my_cluster"
)
}

Run the code above in your browser using DataLab