Skip to content

Deregister Task Definition

ecs_deregister_task_definition R Documentation

Deregisters the specified task definition by family and revision

Description

Deregisters the specified task definition by family and revision. Upon deregistration, the task definition is marked as INACTIVE. Existing tasks and services that reference an INACTIVE task definition continue to run without disruption. Existing services that reference an INACTIVE task definition can still scale up or down by modifying the service's desired count. If you want to delete a task definition revision, you must first deregister the task definition revision.

You can't use an INACTIVE task definition to run new tasks or create new services, and you can't update an existing service to reference an INACTIVE task definition. However, there may be up to a 10-minute window following deregistration where these restrictions have not yet taken effect.

At this time, INACTIVE task definitions remain discoverable in your account indefinitely. However, this behavior is subject to change in the future. We don't recommend that you rely on INACTIVE task definitions persisting beyond the lifecycle of any associated tasks and services.

You must deregister a task definition revision before you delete it. For more information, see delete_task_definitions.

Usage

ecs_deregister_task_definition(taskDefinition)

Arguments

taskDefinition

[required] The family and revision (family:revision) or full Amazon Resource Name (ARN) of the task definition to deregister. You must specify a revision.

Value

A list with the following syntax:

list(
  taskDefinition = list(
    taskDefinitionArn = "string",
    containerDefinitions = list(
      list(
        name = "string",
        image = "string",
        repositoryCredentials = list(
          credentialsParameter = "string"
        ),
        cpu = 123,
        memory = 123,
        memoryReservation = 123,
        links = list(
          "string"
        ),
        portMappings = list(
          list(
            containerPort = 123,
            hostPort = 123,
            protocol = "tcp"|"udp",
            name = "string",
            appProtocol = "http"|"http2"|"grpc",
            containerPortRange = "string"
          )
        ),
        essential = TRUE|FALSE,
        restartPolicy = list(
          enabled = TRUE|FALSE,
          ignoredExitCodes = list(
            123
          ),
          restartAttemptPeriod = 123
        ),
        entryPoint = list(
          "string"
        ),
        command = list(
          "string"
        ),
        environment = list(
          list(
            name = "string",
            value = "string"
          )
        ),
        environmentFiles = list(
          list(
            value = "string",
            type = "s3"
          )
        ),
        mountPoints = list(
          list(
            sourceVolume = "string",
            containerPath = "string",
            readOnly = TRUE|FALSE
          )
        ),
        volumesFrom = list(
          list(
            sourceContainer = "string",
            readOnly = TRUE|FALSE
          )
        ),
        linuxParameters = list(
          capabilities = list(
            add = list(
              "string"
            ),
            drop = list(
              "string"
            )
          ),
          devices = list(
            list(
              hostPath = "string",
              containerPath = "string",
              permissions = list(
                "read"|"write"|"mknod"
              )
            )
          ),
          initProcessEnabled = TRUE|FALSE,
          sharedMemorySize = 123,
          tmpfs = list(
            list(
              containerPath = "string",
              size = 123,
              mountOptions = list(
                "string"
              )
            )
          ),
          maxSwap = 123,
          swappiness = 123
        ),
        secrets = list(
          list(
            name = "string",
            valueFrom = "string"
          )
        ),
        dependsOn = list(
          list(
            containerName = "string",
            condition = "START"|"COMPLETE"|"SUCCESS"|"HEALTHY"
          )
        ),
        startTimeout = 123,
        stopTimeout = 123,
        hostname = "string",
        user = "string",
        workingDirectory = "string",
        disableNetworking = TRUE|FALSE,
        privileged = TRUE|FALSE,
        readonlyRootFilesystem = TRUE|FALSE,
        dnsServers = list(
          "string"
        ),
        dnsSearchDomains = list(
          "string"
        ),
        extraHosts = list(
          list(
            hostname = "string",
            ipAddress = "string"
          )
        ),
        dockerSecurityOptions = list(
          "string"
        ),
        interactive = TRUE|FALSE,
        pseudoTerminal = TRUE|FALSE,
        dockerLabels = list(
          "string"
        ),
        ulimits = list(
          list(
            name = "core"|"cpu"|"data"|"fsize"|"locks"|"memlock"|"msgqueue"|"nice"|"nofile"|"nproc"|"rss"|"rtprio"|"rttime"|"sigpending"|"stack",
            softLimit = 123,
            hardLimit = 123
          )
        ),
        logConfiguration = list(
          logDriver = "json-file"|"syslog"|"journald"|"gelf"|"fluentd"|"awslogs"|"splunk"|"awsfirelens",
          options = list(
            "string"
          ),
          secretOptions = list(
            list(
              name = "string",
              valueFrom = "string"
            )
          )
        ),
        healthCheck = list(
          command = list(
            "string"
          ),
          interval = 123,
          timeout = 123,
          retries = 123,
          startPeriod = 123
        ),
        systemControls = list(
          list(
            namespace = "string",
            value = "string"
          )
        ),
        resourceRequirements = list(
          list(
            value = "string",
            type = "GPU"|"InferenceAccelerator"
          )
        ),
        firelensConfiguration = list(
          type = "fluentd"|"fluentbit",
          options = list(
            "string"
          )
        ),
        credentialSpecs = list(
          "string"
        )
      )
    ),
    family = "string",
    taskRoleArn = "string",
    executionRoleArn = "string",
    networkMode = "bridge"|"host"|"awsvpc"|"none",
    revision = 123,
    volumes = list(
      list(
        name = "string",
        host = list(
          sourcePath = "string"
        ),
        dockerVolumeConfiguration = list(
          scope = "task"|"shared",
          autoprovision = TRUE|FALSE,
          driver = "string",
          driverOpts = list(
            "string"
          ),
          labels = list(
            "string"
          )
        ),
        efsVolumeConfiguration = list(
          fileSystemId = "string",
          rootDirectory = "string",
          transitEncryption = "ENABLED"|"DISABLED",
          transitEncryptionPort = 123,
          authorizationConfig = list(
            accessPointId = "string",
            iam = "ENABLED"|"DISABLED"
          )
        ),
        fsxWindowsFileServerVolumeConfiguration = list(
          fileSystemId = "string",
          rootDirectory = "string",
          authorizationConfig = list(
            credentialsParameter = "string",
            domain = "string"
          )
        ),
        configuredAtLaunch = TRUE|FALSE
      )
    ),
    status = "ACTIVE"|"INACTIVE"|"DELETE_IN_PROGRESS",
    requiresAttributes = list(
      list(
        name = "string",
        value = "string",
        targetType = "container-instance",
        targetId = "string"
      )
    ),
    placementConstraints = list(
      list(
        type = "memberOf",
        expression = "string"
      )
    ),
    compatibilities = list(
      "EC2"|"FARGATE"|"EXTERNAL"
    ),
    runtimePlatform = list(
      cpuArchitecture = "X86_64"|"ARM64",
      operatingSystemFamily = "WINDOWS_SERVER_2019_FULL"|"WINDOWS_SERVER_2019_CORE"|"WINDOWS_SERVER_2016_FULL"|"WINDOWS_SERVER_2004_CORE"|"WINDOWS_SERVER_2022_CORE"|"WINDOWS_SERVER_2022_FULL"|"WINDOWS_SERVER_20H2_CORE"|"LINUX"
    ),
    requiresCompatibilities = list(
      "EC2"|"FARGATE"|"EXTERNAL"
    ),
    cpu = "string",
    memory = "string",
    inferenceAccelerators = list(
      list(
        deviceName = "string",
        deviceType = "string"
      )
    ),
    pidMode = "host"|"task",
    ipcMode = "host"|"task"|"none",
    proxyConfiguration = list(
      type = "APPMESH",
      containerName = "string",
      properties = list(
        list(
          name = "string",
          value = "string"
        )
      )
    ),
    registeredAt = as.POSIXct(
      "2015-01-01"
    ),
    deregisteredAt = as.POSIXct(
      "2015-01-01"
    ),
    registeredBy = "string",
    ephemeralStorage = list(
      sizeInGiB = 123
    )
  )
)

Request syntax

svc$deregister_task_definition(
  taskDefinition = "string"
)