/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.ecs.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* The Service Connect configuration of your Amazon ECS service. The configuration for this service to discover and * connect to services, and be discovered by, and connected from, other services within a namespace. *
** Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to * services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects * logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service * Connect. For more information, see Service Connect in the * Amazon Elastic Container Service Developer Guide. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ServiceConnectConfiguration implements Serializable, Cloneable, StructuredPojo { /** ** Specifies whether to use Service Connect with this service. *
*/ private Boolean enabled; /** ** The namespace name or full Amazon Resource Name (ARN) of the Cloud Map namespace for use with Service Connect. * The namespace must be in the same Amazon Web Services Region as the Amazon ECS service and cluster. The type of * namespace doesn't affect Service Connect. For more information about Cloud Map, see Working with Services in * the Cloud Map Developer Guide. *
*/ private String namespace; /** ** The list of Service Connect service objects. These are names and aliases (also known as endpoints) that are used * by other Amazon ECS services to connect to this service. *
** This field is not required for a "client" Amazon ECS service that's a member of a namespace only to connect to * other services within the namespace. An example of this would be a frontend application that accepts incoming * requests from either a load balancer that's attached to the service or by other means. *
** An object selects a port from the task definition, assigns a name for the Cloud Map service, and a list of * aliases (endpoints) and ports for client applications to refer to this service. *
*/ private com.amazonaws.internal.SdkInternalList* Specifies whether to use Service Connect with this service. *
* * @param enabled * Specifies whether to use Service Connect with this service. */ public void setEnabled(Boolean enabled) { this.enabled = enabled; } /** ** Specifies whether to use Service Connect with this service. *
* * @return Specifies whether to use Service Connect with this service. */ public Boolean getEnabled() { return this.enabled; } /** ** Specifies whether to use Service Connect with this service. *
* * @param enabled * Specifies whether to use Service Connect with this service. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceConnectConfiguration withEnabled(Boolean enabled) { setEnabled(enabled); return this; } /** ** Specifies whether to use Service Connect with this service. *
* * @return Specifies whether to use Service Connect with this service. */ public Boolean isEnabled() { return this.enabled; } /** ** The namespace name or full Amazon Resource Name (ARN) of the Cloud Map namespace for use with Service Connect. * The namespace must be in the same Amazon Web Services Region as the Amazon ECS service and cluster. The type of * namespace doesn't affect Service Connect. For more information about Cloud Map, see Working with Services in * the Cloud Map Developer Guide. *
* * @param namespace * The namespace name or full Amazon Resource Name (ARN) of the Cloud Map namespace for use with Service * Connect. The namespace must be in the same Amazon Web Services Region as the Amazon ECS service and * cluster. The type of namespace doesn't affect Service Connect. For more information about Cloud Map, see * Working with * Services in the Cloud Map Developer Guide. */ public void setNamespace(String namespace) { this.namespace = namespace; } /** ** The namespace name or full Amazon Resource Name (ARN) of the Cloud Map namespace for use with Service Connect. * The namespace must be in the same Amazon Web Services Region as the Amazon ECS service and cluster. The type of * namespace doesn't affect Service Connect. For more information about Cloud Map, see Working with Services in * the Cloud Map Developer Guide. *
* * @return The namespace name or full Amazon Resource Name (ARN) of the Cloud Map namespace for use with Service * Connect. The namespace must be in the same Amazon Web Services Region as the Amazon ECS service and * cluster. The type of namespace doesn't affect Service Connect. For more information about Cloud Map, see * Working with * Services in the Cloud Map Developer Guide. */ public String getNamespace() { return this.namespace; } /** ** The namespace name or full Amazon Resource Name (ARN) of the Cloud Map namespace for use with Service Connect. * The namespace must be in the same Amazon Web Services Region as the Amazon ECS service and cluster. The type of * namespace doesn't affect Service Connect. For more information about Cloud Map, see Working with Services in * the Cloud Map Developer Guide. *
* * @param namespace * The namespace name or full Amazon Resource Name (ARN) of the Cloud Map namespace for use with Service * Connect. The namespace must be in the same Amazon Web Services Region as the Amazon ECS service and * cluster. The type of namespace doesn't affect Service Connect. For more information about Cloud Map, see * Working with * Services in the Cloud Map Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceConnectConfiguration withNamespace(String namespace) { setNamespace(namespace); return this; } /** ** The list of Service Connect service objects. These are names and aliases (also known as endpoints) that are used * by other Amazon ECS services to connect to this service. *
** This field is not required for a "client" Amazon ECS service that's a member of a namespace only to connect to * other services within the namespace. An example of this would be a frontend application that accepts incoming * requests from either a load balancer that's attached to the service or by other means. *
** An object selects a port from the task definition, assigns a name for the Cloud Map service, and a list of * aliases (endpoints) and ports for client applications to refer to this service. *
* * @return The list of Service Connect service objects. These are names and aliases (also known as endpoints) that * are used by other Amazon ECS services to connect to this service. ** This field is not required for a "client" Amazon ECS service that's a member of a namespace only to * connect to other services within the namespace. An example of this would be a frontend application that * accepts incoming requests from either a load balancer that's attached to the service or by other means. *
*
* An object selects a port from the task definition, assigns a name for the Cloud Map service, and a list
* of aliases (endpoints) and ports for client applications to refer to this service.
*/
public java.util.List
* The list of Service Connect service objects. These are names and aliases (also known as endpoints) that are used
* by other Amazon ECS services to connect to this service.
*
* This field is not required for a "client" Amazon ECS service that's a member of a namespace only to connect to
* other services within the namespace. An example of this would be a frontend application that accepts incoming
* requests from either a load balancer that's attached to the service or by other means.
*
* An object selects a port from the task definition, assigns a name for the Cloud Map service, and a list of
* aliases (endpoints) and ports for client applications to refer to this service.
*
* This field is not required for a "client" Amazon ECS service that's a member of a namespace only to * connect to other services within the namespace. An example of this would be a frontend application that * accepts incoming requests from either a load balancer that's attached to the service or by other means. *
*
* An object selects a port from the task definition, assigns a name for the Cloud Map service, and a list of
* aliases (endpoints) and ports for client applications to refer to this service.
*/
public void setServices(java.util.Collection
* The list of Service Connect service objects. These are names and aliases (also known as endpoints) that are used
* by other Amazon ECS services to connect to this service.
*
* This field is not required for a "client" Amazon ECS service that's a member of a namespace only to connect to
* other services within the namespace. An example of this would be a frontend application that accepts incoming
* requests from either a load balancer that's attached to the service or by other means.
*
* An object selects a port from the task definition, assigns a name for the Cloud Map service, and a list of
* aliases (endpoints) and ports for client applications to refer to this service.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setServices(java.util.Collection)} or {@link #withServices(java.util.Collection)} if you want to override
* the existing values.
*
* This field is not required for a "client" Amazon ECS service that's a member of a namespace only to * connect to other services within the namespace. An example of this would be a frontend application that * accepts incoming requests from either a load balancer that's attached to the service or by other means. *
*
* An object selects a port from the task definition, assigns a name for the Cloud Map service, and a list of
* aliases (endpoints) and ports for client applications to refer to this service.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceConnectConfiguration withServices(ServiceConnectService... services) {
if (this.services == null) {
setServices(new com.amazonaws.internal.SdkInternalList
* The list of Service Connect service objects. These are names and aliases (also known as endpoints) that are used
* by other Amazon ECS services to connect to this service.
*
* This field is not required for a "client" Amazon ECS service that's a member of a namespace only to connect to
* other services within the namespace. An example of this would be a frontend application that accepts incoming
* requests from either a load balancer that's attached to the service or by other means.
*
* An object selects a port from the task definition, assigns a name for the Cloud Map service, and a list of
* aliases (endpoints) and ports for client applications to refer to this service.
*
* This field is not required for a "client" Amazon ECS service that's a member of a namespace only to * connect to other services within the namespace. An example of this would be a frontend application that * accepts incoming requests from either a load balancer that's attached to the service or by other means. *
*
* An object selects a port from the task definition, assigns a name for the Cloud Map service, and a list of
* aliases (endpoints) and ports for client applications to refer to this service.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceConnectConfiguration withServices(java.util.Collection