Class Service

    • Constructor Detail

      • Service

        public Service()
    • Method Detail

      • setServiceArn

        public void setServiceArn​(String serviceArn)

        The Amazon Resource Name (ARN) that identifies the service. The ARN contains the arn:aws:ecs namespace, followed by the region of the service, the AWS account ID of the service owner, the service namespace, and then the service name. For example, arn:aws:ecs:region:012345678910:service/my-service .

        Parameters:
        serviceArn - The Amazon Resource Name (ARN) that identifies the service. The ARN contains the arn:aws:ecs namespace, followed by the region of the service, the AWS account ID of the service owner, the service namespace, and then the service name. For example, arn:aws:ecs:region:012345678910:service/my-service .
      • getServiceArn

        public String getServiceArn()

        The Amazon Resource Name (ARN) that identifies the service. The ARN contains the arn:aws:ecs namespace, followed by the region of the service, the AWS account ID of the service owner, the service namespace, and then the service name. For example, arn:aws:ecs:region:012345678910:service/my-service .

        Returns:
        The Amazon Resource Name (ARN) that identifies the service. The ARN contains the arn:aws:ecs namespace, followed by the region of the service, the AWS account ID of the service owner, the service namespace, and then the service name. For example, arn:aws:ecs:region:012345678910:service/my-service .
      • withServiceArn

        public Service withServiceArn​(String serviceArn)

        The Amazon Resource Name (ARN) that identifies the service. The ARN contains the arn:aws:ecs namespace, followed by the region of the service, the AWS account ID of the service owner, the service namespace, and then the service name. For example, arn:aws:ecs:region:012345678910:service/my-service .

        Parameters:
        serviceArn - The Amazon Resource Name (ARN) that identifies the service. The ARN contains the arn:aws:ecs namespace, followed by the region of the service, the AWS account ID of the service owner, the service namespace, and then the service name. For example, arn:aws:ecs:region:012345678910:service/my-service .
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setServiceName

        public void setServiceName​(String serviceName)

        The name of your service. Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed. Service names must be unique within a cluster, but you can have similarly named services in multiple clusters within a region or across multiple regions.

        Parameters:
        serviceName - The name of your service. Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed. Service names must be unique within a cluster, but you can have similarly named services in multiple clusters within a region or across multiple regions.
      • getServiceName

        public String getServiceName()

        The name of your service. Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed. Service names must be unique within a cluster, but you can have similarly named services in multiple clusters within a region or across multiple regions.

        Returns:
        The name of your service. Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed. Service names must be unique within a cluster, but you can have similarly named services in multiple clusters within a region or across multiple regions.
      • withServiceName

        public Service withServiceName​(String serviceName)

        The name of your service. Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed. Service names must be unique within a cluster, but you can have similarly named services in multiple clusters within a region or across multiple regions.

        Parameters:
        serviceName - The name of your service. Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed. Service names must be unique within a cluster, but you can have similarly named services in multiple clusters within a region or across multiple regions.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setClusterArn

        public void setClusterArn​(String clusterArn)

        The Amazon Resource Name (ARN) of the cluster that hosts the service.

        Parameters:
        clusterArn - The Amazon Resource Name (ARN) of the cluster that hosts the service.
      • getClusterArn

        public String getClusterArn()

        The Amazon Resource Name (ARN) of the cluster that hosts the service.

        Returns:
        The Amazon Resource Name (ARN) of the cluster that hosts the service.
      • withClusterArn

        public Service withClusterArn​(String clusterArn)

        The Amazon Resource Name (ARN) of the cluster that hosts the service.

        Parameters:
        clusterArn - The Amazon Resource Name (ARN) of the cluster that hosts the service.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • getLoadBalancers

        public List<LoadBalancer> getLoadBalancers()

        A list of load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.

        Returns:
        A list of load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
      • setLoadBalancers

        public void setLoadBalancers​(Collection<LoadBalancer> loadBalancers)

        A list of load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.

        Parameters:
        loadBalancers - A list of load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
      • withLoadBalancers

        public Service withLoadBalancers​(LoadBalancer... loadBalancers)

        A list of load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.

        NOTE: This method appends the values to the existing list (if any). Use setLoadBalancers(java.util.Collection) or withLoadBalancers(java.util.Collection) if you want to override the existing values.

        Parameters:
        loadBalancers - A list of load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • withLoadBalancers

        public Service withLoadBalancers​(Collection<LoadBalancer> loadBalancers)

        A list of load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.

        Parameters:
        loadBalancers - A list of load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setStatus

        public void setStatus​(String status)

        The status of the service. The valid values are ACTIVE, DRAINING, or INACTIVE.

        Parameters:
        status - The status of the service. The valid values are ACTIVE, DRAINING, or INACTIVE.
      • getStatus

        public String getStatus()

        The status of the service. The valid values are ACTIVE, DRAINING, or INACTIVE.

        Returns:
        The status of the service. The valid values are ACTIVE, DRAINING, or INACTIVE.
      • withStatus

        public Service withStatus​(String status)

        The status of the service. The valid values are ACTIVE, DRAINING, or INACTIVE.

        Parameters:
        status - The status of the service. The valid values are ACTIVE, DRAINING, or INACTIVE.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setDesiredCount

        public void setDesiredCount​(Integer desiredCount)

        The desired number of instantiations of the task definition to keep running on the service. This value is specified when the service is created with CreateService, and it can be modified with UpdateService.

        Parameters:
        desiredCount - The desired number of instantiations of the task definition to keep running on the service. This value is specified when the service is created with CreateService, and it can be modified with UpdateService.
      • getDesiredCount

        public Integer getDesiredCount()

        The desired number of instantiations of the task definition to keep running on the service. This value is specified when the service is created with CreateService, and it can be modified with UpdateService.

        Returns:
        The desired number of instantiations of the task definition to keep running on the service. This value is specified when the service is created with CreateService, and it can be modified with UpdateService.
      • withDesiredCount

        public Service withDesiredCount​(Integer desiredCount)

        The desired number of instantiations of the task definition to keep running on the service. This value is specified when the service is created with CreateService, and it can be modified with UpdateService.

        Parameters:
        desiredCount - The desired number of instantiations of the task definition to keep running on the service. This value is specified when the service is created with CreateService, and it can be modified with UpdateService.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setRunningCount

        public void setRunningCount​(Integer runningCount)

        The number of tasks in the cluster that are in the RUNNING state.

        Parameters:
        runningCount - The number of tasks in the cluster that are in the RUNNING state.
      • getRunningCount

        public Integer getRunningCount()

        The number of tasks in the cluster that are in the RUNNING state.

        Returns:
        The number of tasks in the cluster that are in the RUNNING state.
      • withRunningCount

        public Service withRunningCount​(Integer runningCount)

        The number of tasks in the cluster that are in the RUNNING state.

        Parameters:
        runningCount - The number of tasks in the cluster that are in the RUNNING state.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setPendingCount

        public void setPendingCount​(Integer pendingCount)

        The number of tasks in the cluster that are in the PENDING state.

        Parameters:
        pendingCount - The number of tasks in the cluster that are in the PENDING state.
      • getPendingCount

        public Integer getPendingCount()

        The number of tasks in the cluster that are in the PENDING state.

        Returns:
        The number of tasks in the cluster that are in the PENDING state.
      • withPendingCount

        public Service withPendingCount​(Integer pendingCount)

        The number of tasks in the cluster that are in the PENDING state.

        Parameters:
        pendingCount - The number of tasks in the cluster that are in the PENDING state.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setTaskDefinition

        public void setTaskDefinition​(String taskDefinition)

        The task definition to use for tasks in the service. This value is specified when the service is created with CreateService, and it can be modified with UpdateService.

        Parameters:
        taskDefinition - The task definition to use for tasks in the service. This value is specified when the service is created with CreateService, and it can be modified with UpdateService.
      • getTaskDefinition

        public String getTaskDefinition()

        The task definition to use for tasks in the service. This value is specified when the service is created with CreateService, and it can be modified with UpdateService.

        Returns:
        The task definition to use for tasks in the service. This value is specified when the service is created with CreateService, and it can be modified with UpdateService.
      • withTaskDefinition

        public Service withTaskDefinition​(String taskDefinition)

        The task definition to use for tasks in the service. This value is specified when the service is created with CreateService, and it can be modified with UpdateService.

        Parameters:
        taskDefinition - The task definition to use for tasks in the service. This value is specified when the service is created with CreateService, and it can be modified with UpdateService.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setDeploymentConfiguration

        public void setDeploymentConfiguration​(DeploymentConfiguration deploymentConfiguration)

        Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.

        Parameters:
        deploymentConfiguration - Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
      • getDeploymentConfiguration

        public DeploymentConfiguration getDeploymentConfiguration()

        Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.

        Returns:
        Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
      • withDeploymentConfiguration

        public Service withDeploymentConfiguration​(DeploymentConfiguration deploymentConfiguration)

        Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.

        Parameters:
        deploymentConfiguration - Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • getDeployments

        public List<Deployment> getDeployments()

        The current state of deployments for the service.

        Returns:
        The current state of deployments for the service.
      • setDeployments

        public void setDeployments​(Collection<Deployment> deployments)

        The current state of deployments for the service.

        Parameters:
        deployments - The current state of deployments for the service.
      • withDeployments

        public Service withDeployments​(Deployment... deployments)

        The current state of deployments for the service.

        NOTE: This method appends the values to the existing list (if any). Use setDeployments(java.util.Collection) or withDeployments(java.util.Collection) if you want to override the existing values.

        Parameters:
        deployments - The current state of deployments for the service.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • withDeployments

        public Service withDeployments​(Collection<Deployment> deployments)

        The current state of deployments for the service.

        Parameters:
        deployments - The current state of deployments for the service.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setRoleArn

        public void setRoleArn​(String roleArn)

        The Amazon Resource Name (ARN) of the IAM role associated with the service that allows the Amazon ECS container agent to register container instances with a load balancer.

        Parameters:
        roleArn - The Amazon Resource Name (ARN) of the IAM role associated with the service that allows the Amazon ECS container agent to register container instances with a load balancer.
      • getRoleArn

        public String getRoleArn()

        The Amazon Resource Name (ARN) of the IAM role associated with the service that allows the Amazon ECS container agent to register container instances with a load balancer.

        Returns:
        The Amazon Resource Name (ARN) of the IAM role associated with the service that allows the Amazon ECS container agent to register container instances with a load balancer.
      • withRoleArn

        public Service withRoleArn​(String roleArn)

        The Amazon Resource Name (ARN) of the IAM role associated with the service that allows the Amazon ECS container agent to register container instances with a load balancer.

        Parameters:
        roleArn - The Amazon Resource Name (ARN) of the IAM role associated with the service that allows the Amazon ECS container agent to register container instances with a load balancer.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • getEvents

        public List<ServiceEvent> getEvents()

        The event stream for your service. A maximum of 100 of the latest events are displayed.

        Returns:
        The event stream for your service. A maximum of 100 of the latest events are displayed.
      • setEvents

        public void setEvents​(Collection<ServiceEvent> events)

        The event stream for your service. A maximum of 100 of the latest events are displayed.

        Parameters:
        events - The event stream for your service. A maximum of 100 of the latest events are displayed.
      • withEvents

        public Service withEvents​(ServiceEvent... events)

        The event stream for your service. A maximum of 100 of the latest events are displayed.

        NOTE: This method appends the values to the existing list (if any). Use setEvents(java.util.Collection) or withEvents(java.util.Collection) if you want to override the existing values.

        Parameters:
        events - The event stream for your service. A maximum of 100 of the latest events are displayed.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • withEvents

        public Service withEvents​(Collection<ServiceEvent> events)

        The event stream for your service. A maximum of 100 of the latest events are displayed.

        Parameters:
        events - The event stream for your service. A maximum of 100 of the latest events are displayed.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setCreatedAt

        public void setCreatedAt​(Date createdAt)

        The Unix time in seconds and milliseconds when the service was created.

        Parameters:
        createdAt - The Unix time in seconds and milliseconds when the service was created.
      • getCreatedAt

        public Date getCreatedAt()

        The Unix time in seconds and milliseconds when the service was created.

        Returns:
        The Unix time in seconds and milliseconds when the service was created.
      • withCreatedAt

        public Service withCreatedAt​(Date createdAt)

        The Unix time in seconds and milliseconds when the service was created.

        Parameters:
        createdAt - The Unix time in seconds and milliseconds when the service was created.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • toString

        public String toString()
        Returns a string representation of this object; useful for testing and debugging.
        Overrides:
        toString in class Object
        Returns:
        A string representation of this object.
        See Also:
        Object.toString()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object