All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.batch.model.LogConfiguration Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Batch module holds the client classes that are used for communicating with AWS Batch.

There is a newer version: 2.29.15
Show newest version
/*
 * Copyright 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 software.amazon.awssdk.services.batch.model;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Log configuration options to send to a custom log driver for the container. *

*/ @Generated("software.amazon.awssdk:codegen") public final class LogConfiguration implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField LOG_DRIVER_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("logDriver").getter(getter(LogConfiguration::logDriverAsString)).setter(setter(Builder::logDriver)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("logDriver").build()).build(); private static final SdkField> OPTIONS_FIELD = SdkField .> builder(MarshallingType.MAP) .memberName("options") .getter(getter(LogConfiguration::options)) .setter(setter(Builder::options)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("options").build(), MapTrait.builder() .keyLocationName("key") .valueLocationName("value") .valueFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("value").build()).build()).build()).build(); private static final SdkField> SECRET_OPTIONS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("secretOptions") .getter(getter(LogConfiguration::secretOptions)) .setter(setter(Builder::secretOptions)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("secretOptions").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(Secret::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(LOG_DRIVER_FIELD, OPTIONS_FIELD, SECRET_OPTIONS_FIELD)); private static final long serialVersionUID = 1L; private final String logDriver; private final Map options; private final List secretOptions; private LogConfiguration(BuilderImpl builder) { this.logDriver = builder.logDriver; this.options = builder.options; this.secretOptions = builder.secretOptions; } /** *

* The log driver to use for the container. The valid values that are listed for this parameter are log drivers that * the Amazon ECS container agent can communicate with by default. *

*

* The supported log drivers are awslogs, fluentd, gelf, * json-file, journald, logentries, syslog, and * splunk. *

* *

* Jobs that are running on Fargate resources are restricted to the awslogs and splunk log * drivers. *

*
*
*
awslogs
*
*

* Specifies the Amazon CloudWatch Logs logging driver. For more information, see Using the awslogs log driver in * the Batch User Guide and Amazon * CloudWatch Logs logging driver in the Docker documentation. *

*
*
fluentd
*
*

* Specifies the Fluentd logging driver. For more information including usage and options, see Fluentd logging driver in the Docker * documentation. *

*
*
gelf
*
*

* Specifies the Graylog Extended Format (GELF) logging driver. For more information including usage and options, * see Graylog Extended Format logging driver * in the Docker documentation. *

*
*
journald
*
*

* Specifies the journald logging driver. For more information including usage and options, see Journald logging driver in the Docker * documentation. *

*
*
json-file
*
*

* Specifies the JSON file logging driver. For more information including usage and options, see JSON File logging driver in the Docker * documentation. *

*
*
splunk
*
*

* Specifies the Splunk logging driver. For more information including usage and options, see Splunk logging driver in the Docker * documentation. *

*
*
syslog
*
*

* Specifies the syslog logging driver. For more information including usage and options, see Syslog logging driver in the Docker * documentation. *

*
*
* *

* If you have a custom driver that's not listed earlier that you want to work with the Amazon ECS container agent, * you can fork the Amazon ECS container agent project that's available on GitHub and customize it to work with that driver. * We encourage you to submit pull requests for changes that you want to have included. However, Amazon Web Services * doesn't currently support running modified copies of this software. *

*
*

* This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the * Docker Remote API version on your container instance, log in to your container instance and run the following * command: sudo docker version | grep "Server API version" *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #logDriver} will * return {@link LogDriver#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #logDriverAsString}. *

* * @return The log driver to use for the container. The valid values that are listed for this parameter are log * drivers that the Amazon ECS container agent can communicate with by default.

*

* The supported log drivers are awslogs, fluentd, gelf, * json-file, journald, logentries, syslog, and * splunk. *

* *

* Jobs that are running on Fargate resources are restricted to the awslogs and * splunk log drivers. *

*
*
*
awslogs
*
*

* Specifies the Amazon CloudWatch Logs logging driver. For more information, see Using the awslogs log * driver in the Batch User Guide and Amazon CloudWatch Logs logging * driver in the Docker documentation. *

*
*
fluentd
*
*

* Specifies the Fluentd logging driver. For more information including usage and options, see Fluentd logging driver in the * Docker documentation. *

*
*
gelf
*
*

* Specifies the Graylog Extended Format (GELF) logging driver. For more information including usage and * options, see Graylog Extended Format * logging driver in the Docker documentation. *

*
*
journald
*
*

* Specifies the journald logging driver. For more information including usage and options, see Journald logging driver in the * Docker documentation. *

*
*
json-file
*
*

* Specifies the JSON file logging driver. For more information including usage and options, see JSON File logging driver in the * Docker documentation. *

*
*
splunk
*
*

* Specifies the Splunk logging driver. For more information including usage and options, see Splunk logging driver in the * Docker documentation. *

*
*
syslog
*
*

* Specifies the syslog logging driver. For more information including usage and options, see Syslog logging driver in the * Docker documentation. *

*
*
* *

* If you have a custom driver that's not listed earlier that you want to work with the Amazon ECS container * agent, you can fork the Amazon ECS container agent project that's available on GitHub and customize it to work with that * driver. We encourage you to submit pull requests for changes that you want to have included. However, * Amazon Web Services doesn't currently support running modified copies of this software. *

*
*

* This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To * check the Docker Remote API version on your container instance, log in to your container instance and run * the following command: sudo docker version | grep "Server API version" * @see LogDriver */ public final LogDriver logDriver() { return LogDriver.fromValue(logDriver); } /** *

* The log driver to use for the container. The valid values that are listed for this parameter are log drivers that * the Amazon ECS container agent can communicate with by default. *

*

* The supported log drivers are awslogs, fluentd, gelf, * json-file, journald, logentries, syslog, and * splunk. *

* *

* Jobs that are running on Fargate resources are restricted to the awslogs and splunk log * drivers. *

*
*
*
awslogs
*
*

* Specifies the Amazon CloudWatch Logs logging driver. For more information, see Using the awslogs log driver in * the Batch User Guide and Amazon * CloudWatch Logs logging driver in the Docker documentation. *

*
*
fluentd
*
*

* Specifies the Fluentd logging driver. For more information including usage and options, see Fluentd logging driver in the Docker * documentation. *

*
*
gelf
*
*

* Specifies the Graylog Extended Format (GELF) logging driver. For more information including usage and options, * see Graylog Extended Format logging driver * in the Docker documentation. *

*
*
journald
*
*

* Specifies the journald logging driver. For more information including usage and options, see Journald logging driver in the Docker * documentation. *

*
*
json-file
*
*

* Specifies the JSON file logging driver. For more information including usage and options, see JSON File logging driver in the Docker * documentation. *

*
*
splunk
*
*

* Specifies the Splunk logging driver. For more information including usage and options, see Splunk logging driver in the Docker * documentation. *

*
*
syslog
*
*

* Specifies the syslog logging driver. For more information including usage and options, see Syslog logging driver in the Docker * documentation. *

*
*
* *

* If you have a custom driver that's not listed earlier that you want to work with the Amazon ECS container agent, * you can fork the Amazon ECS container agent project that's available on GitHub and customize it to work with that driver. * We encourage you to submit pull requests for changes that you want to have included. However, Amazon Web Services * doesn't currently support running modified copies of this software. *

*
*

* This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the * Docker Remote API version on your container instance, log in to your container instance and run the following * command: sudo docker version | grep "Server API version" *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #logDriver} will * return {@link LogDriver#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #logDriverAsString}. *

* * @return The log driver to use for the container. The valid values that are listed for this parameter are log * drivers that the Amazon ECS container agent can communicate with by default.

*

* The supported log drivers are awslogs, fluentd, gelf, * json-file, journald, logentries, syslog, and * splunk. *

* *

* Jobs that are running on Fargate resources are restricted to the awslogs and * splunk log drivers. *

*
*
*
awslogs
*
*

* Specifies the Amazon CloudWatch Logs logging driver. For more information, see Using the awslogs log * driver in the Batch User Guide and Amazon CloudWatch Logs logging * driver in the Docker documentation. *

*
*
fluentd
*
*

* Specifies the Fluentd logging driver. For more information including usage and options, see Fluentd logging driver in the * Docker documentation. *

*
*
gelf
*
*

* Specifies the Graylog Extended Format (GELF) logging driver. For more information including usage and * options, see Graylog Extended Format * logging driver in the Docker documentation. *

*
*
journald
*
*

* Specifies the journald logging driver. For more information including usage and options, see Journald logging driver in the * Docker documentation. *

*
*
json-file
*
*

* Specifies the JSON file logging driver. For more information including usage and options, see JSON File logging driver in the * Docker documentation. *

*
*
splunk
*
*

* Specifies the Splunk logging driver. For more information including usage and options, see Splunk logging driver in the * Docker documentation. *

*
*
syslog
*
*

* Specifies the syslog logging driver. For more information including usage and options, see Syslog logging driver in the * Docker documentation. *

*
*
* *

* If you have a custom driver that's not listed earlier that you want to work with the Amazon ECS container * agent, you can fork the Amazon ECS container agent project that's available on GitHub and customize it to work with that * driver. We encourage you to submit pull requests for changes that you want to have included. However, * Amazon Web Services doesn't currently support running modified copies of this software. *

*
*

* This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To * check the Docker Remote API version on your container instance, log in to your container instance and run * the following command: sudo docker version | grep "Server API version" * @see LogDriver */ public final String logDriverAsString() { return logDriver; } /** * For responses, this returns true if the service returned a value for the Options property. This DOES NOT check * that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is * useful because the SDK will never return a null collection or map, but you may need to differentiate between the * service returning nothing (or null) and the service returning an empty collection or map. For requests, this * returns true if a value for the property was specified in the request builder, and false if a value was not * specified. */ public final boolean hasOptions() { return options != null && !(options instanceof SdkAutoConstructMap); } /** *

* The configuration options to send to the log driver. This parameter requires version 1.19 of the Docker Remote * API or greater on your container instance. To check the Docker Remote API version on your container instance, log * in to your container instance and run the following command: * sudo docker version | grep "Server API version" *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasOptions} method. *

* * @return The configuration options to send to the log driver. This parameter requires version 1.19 of the Docker * Remote API or greater on your container instance. To check the Docker Remote API version on your * container instance, log in to your container instance and run the following command: * sudo docker version | grep "Server API version" */ public final Map options() { return options; } /** * For responses, this returns true if the service returned a value for the SecretOptions property. This DOES NOT * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasSecretOptions() { return secretOptions != null && !(secretOptions instanceof SdkAutoConstructList); } /** *

* The secrets to pass to the log configuration. For more information, see Specifying sensitive * data in the Batch User Guide. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasSecretOptions} method. *

* * @return The secrets to pass to the log configuration. For more information, see Specifying * sensitive data in the Batch User Guide. */ public final List secretOptions() { return secretOptions; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(logDriverAsString()); hashCode = 31 * hashCode + Objects.hashCode(hasOptions() ? options() : null); hashCode = 31 * hashCode + Objects.hashCode(hasSecretOptions() ? secretOptions() : null); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof LogConfiguration)) { return false; } LogConfiguration other = (LogConfiguration) obj; return Objects.equals(logDriverAsString(), other.logDriverAsString()) && hasOptions() == other.hasOptions() && Objects.equals(options(), other.options()) && hasSecretOptions() == other.hasSecretOptions() && Objects.equals(secretOptions(), other.secretOptions()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public final String toString() { return ToString.builder("LogConfiguration").add("LogDriver", logDriverAsString()) .add("Options", hasOptions() ? options() : null) .add("SecretOptions", hasSecretOptions() ? secretOptions() : null).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "logDriver": return Optional.ofNullable(clazz.cast(logDriverAsString())); case "options": return Optional.ofNullable(clazz.cast(options())); case "secretOptions": return Optional.ofNullable(clazz.cast(secretOptions())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((LogConfiguration) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The log driver to use for the container. The valid values that are listed for this parameter are log drivers * that the Amazon ECS container agent can communicate with by default. *

*

* The supported log drivers are awslogs, fluentd, gelf, * json-file, journald, logentries, syslog, and * splunk. *

* *

* Jobs that are running on Fargate resources are restricted to the awslogs and splunk * log drivers. *

*
*
*
awslogs
*
*

* Specifies the Amazon CloudWatch Logs logging driver. For more information, see Using the awslogs log driver * in the Batch User Guide and Amazon CloudWatch Logs logging driver * in the Docker documentation. *

*
*
fluentd
*
*

* Specifies the Fluentd logging driver. For more information including usage and options, see Fluentd logging driver in the Docker * documentation. *

*
*
gelf
*
*

* Specifies the Graylog Extended Format (GELF) logging driver. For more information including usage and * options, see Graylog Extended Format * logging driver in the Docker documentation. *

*
*
journald
*
*

* Specifies the journald logging driver. For more information including usage and options, see Journald logging driver in the * Docker documentation. *

*
*
json-file
*
*

* Specifies the JSON file logging driver. For more information including usage and options, see JSON File logging driver in the * Docker documentation. *

*
*
splunk
*
*

* Specifies the Splunk logging driver. For more information including usage and options, see Splunk logging driver in the Docker * documentation. *

*
*
syslog
*
*

* Specifies the syslog logging driver. For more information including usage and options, see Syslog logging driver in the Docker * documentation. *

*
*
* *

* If you have a custom driver that's not listed earlier that you want to work with the Amazon ECS container * agent, you can fork the Amazon ECS container agent project that's available on GitHub and customize it to work with that * driver. We encourage you to submit pull requests for changes that you want to have included. However, Amazon * Web Services doesn't currently support running modified copies of this software. *

*
*

* This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check * the Docker Remote API version on your container instance, log in to your container instance and run the * following command: sudo docker version | grep "Server API version" *

* * @param logDriver * The log driver to use for the container. The valid values that are listed for this parameter are log * drivers that the Amazon ECS container agent can communicate with by default.

*

* The supported log drivers are awslogs, fluentd, gelf, * json-file, journald, logentries, syslog, and * splunk. *

* *

* Jobs that are running on Fargate resources are restricted to the awslogs and * splunk log drivers. *

*
*
*
awslogs
*
*

* Specifies the Amazon CloudWatch Logs logging driver. For more information, see Using the awslogs log * driver in the Batch User Guide and Amazon CloudWatch Logs logging * driver in the Docker documentation. *

*
*
fluentd
*
*

* Specifies the Fluentd logging driver. For more information including usage and options, see Fluentd logging driver in the * Docker documentation. *

*
*
gelf
*
*

* Specifies the Graylog Extended Format (GELF) logging driver. For more information including usage and * options, see Graylog Extended Format * logging driver in the Docker documentation. *

*
*
journald
*
*

* Specifies the journald logging driver. For more information including usage and options, see Journald logging driver in the * Docker documentation. *

*
*
json-file
*
*

* Specifies the JSON file logging driver. For more information including usage and options, see JSON File logging driver in * the Docker documentation. *

*
*
splunk
*
*

* Specifies the Splunk logging driver. For more information including usage and options, see Splunk logging driver in the * Docker documentation. *

*
*
syslog
*
*

* Specifies the syslog logging driver. For more information including usage and options, see Syslog logging driver in the * Docker documentation. *

*
*
* *

* If you have a custom driver that's not listed earlier that you want to work with the Amazon ECS * container agent, you can fork the Amazon ECS container agent project that's available on GitHub and customize it to work with * that driver. We encourage you to submit pull requests for changes that you want to have included. * However, Amazon Web Services doesn't currently support running modified copies of this software. *

*
*

* This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. * To check the Docker Remote API version on your container instance, log in to your container instance * and run the following command: sudo docker version | grep "Server API version" * @see LogDriver * @return Returns a reference to this object so that method calls can be chained together. * @see LogDriver */ Builder logDriver(String logDriver); /** *

* The log driver to use for the container. The valid values that are listed for this parameter are log drivers * that the Amazon ECS container agent can communicate with by default. *

*

* The supported log drivers are awslogs, fluentd, gelf, * json-file, journald, logentries, syslog, and * splunk. *

* *

* Jobs that are running on Fargate resources are restricted to the awslogs and splunk * log drivers. *

*
*
*
awslogs
*
*

* Specifies the Amazon CloudWatch Logs logging driver. For more information, see Using the awslogs log driver * in the Batch User Guide and Amazon CloudWatch Logs logging driver * in the Docker documentation. *

*
*
fluentd
*
*

* Specifies the Fluentd logging driver. For more information including usage and options, see Fluentd logging driver in the Docker * documentation. *

*
*
gelf
*
*

* Specifies the Graylog Extended Format (GELF) logging driver. For more information including usage and * options, see Graylog Extended Format * logging driver in the Docker documentation. *

*
*
journald
*
*

* Specifies the journald logging driver. For more information including usage and options, see Journald logging driver in the * Docker documentation. *

*
*
json-file
*
*

* Specifies the JSON file logging driver. For more information including usage and options, see JSON File logging driver in the * Docker documentation. *

*
*
splunk
*
*

* Specifies the Splunk logging driver. For more information including usage and options, see Splunk logging driver in the Docker * documentation. *

*
*
syslog
*
*

* Specifies the syslog logging driver. For more information including usage and options, see Syslog logging driver in the Docker * documentation. *

*
*
* *

* If you have a custom driver that's not listed earlier that you want to work with the Amazon ECS container * agent, you can fork the Amazon ECS container agent project that's available on GitHub and customize it to work with that * driver. We encourage you to submit pull requests for changes that you want to have included. However, Amazon * Web Services doesn't currently support running modified copies of this software. *

*
*

* This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check * the Docker Remote API version on your container instance, log in to your container instance and run the * following command: sudo docker version | grep "Server API version" *

* * @param logDriver * The log driver to use for the container. The valid values that are listed for this parameter are log * drivers that the Amazon ECS container agent can communicate with by default.

*

* The supported log drivers are awslogs, fluentd, gelf, * json-file, journald, logentries, syslog, and * splunk. *

* *

* Jobs that are running on Fargate resources are restricted to the awslogs and * splunk log drivers. *

*
*
*
awslogs
*
*

* Specifies the Amazon CloudWatch Logs logging driver. For more information, see Using the awslogs log * driver in the Batch User Guide and Amazon CloudWatch Logs logging * driver in the Docker documentation. *

*
*
fluentd
*
*

* Specifies the Fluentd logging driver. For more information including usage and options, see Fluentd logging driver in the * Docker documentation. *

*
*
gelf
*
*

* Specifies the Graylog Extended Format (GELF) logging driver. For more information including usage and * options, see Graylog Extended Format * logging driver in the Docker documentation. *

*
*
journald
*
*

* Specifies the journald logging driver. For more information including usage and options, see Journald logging driver in the * Docker documentation. *

*
*
json-file
*
*

* Specifies the JSON file logging driver. For more information including usage and options, see JSON File logging driver in * the Docker documentation. *

*
*
splunk
*
*

* Specifies the Splunk logging driver. For more information including usage and options, see Splunk logging driver in the * Docker documentation. *

*
*
syslog
*
*

* Specifies the syslog logging driver. For more information including usage and options, see Syslog logging driver in the * Docker documentation. *

*
*
* *

* If you have a custom driver that's not listed earlier that you want to work with the Amazon ECS * container agent, you can fork the Amazon ECS container agent project that's available on GitHub and customize it to work with * that driver. We encourage you to submit pull requests for changes that you want to have included. * However, Amazon Web Services doesn't currently support running modified copies of this software. *

*
*

* This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. * To check the Docker Remote API version on your container instance, log in to your container instance * and run the following command: sudo docker version | grep "Server API version" * @see LogDriver * @return Returns a reference to this object so that method calls can be chained together. * @see LogDriver */ Builder logDriver(LogDriver logDriver); /** *

* The configuration options to send to the log driver. This parameter requires version 1.19 of the Docker * Remote API or greater on your container instance. To check the Docker Remote API version on your container * instance, log in to your container instance and run the following command: * sudo docker version | grep "Server API version" *

* * @param options * The configuration options to send to the log driver. This parameter requires version 1.19 of the * Docker Remote API or greater on your container instance. To check the Docker Remote API version on * your container instance, log in to your container instance and run the following command: * sudo docker version | grep "Server API version" * @return Returns a reference to this object so that method calls can be chained together. */ Builder options(Map options); /** *

* The secrets to pass to the log configuration. For more information, see Specifying sensitive * data in the Batch User Guide. *

* * @param secretOptions * The secrets to pass to the log configuration. For more information, see Specifying * sensitive data in the Batch User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder secretOptions(Collection secretOptions); /** *

* The secrets to pass to the log configuration. For more information, see Specifying sensitive * data in the Batch User Guide. *

* * @param secretOptions * The secrets to pass to the log configuration. For more information, see Specifying * sensitive data in the Batch User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder secretOptions(Secret... secretOptions); /** *

* The secrets to pass to the log configuration. For more information, see Specifying sensitive * data in the Batch User Guide. *

* This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.batch.model.Secret.Builder} avoiding the need to create one manually * via {@link software.amazon.awssdk.services.batch.model.Secret#builder()}. * *

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.batch.model.Secret.Builder#build()} is called immediately and its * result is passed to {@link #secretOptions(List)}. * * @param secretOptions * a consumer that will call methods on * {@link software.amazon.awssdk.services.batch.model.Secret.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #secretOptions(java.util.Collection) */ Builder secretOptions(Consumer... secretOptions); } static final class BuilderImpl implements Builder { private String logDriver; private Map options = DefaultSdkAutoConstructMap.getInstance(); private List secretOptions = DefaultSdkAutoConstructList.getInstance(); private BuilderImpl() { } private BuilderImpl(LogConfiguration model) { logDriver(model.logDriver); options(model.options); secretOptions(model.secretOptions); } public final String getLogDriver() { return logDriver; } public final void setLogDriver(String logDriver) { this.logDriver = logDriver; } @Override public final Builder logDriver(String logDriver) { this.logDriver = logDriver; return this; } @Override public final Builder logDriver(LogDriver logDriver) { this.logDriver(logDriver == null ? null : logDriver.toString()); return this; } public final Map getOptions() { if (options instanceof SdkAutoConstructMap) { return null; } return options; } public final void setOptions(Map options) { this.options = LogConfigurationOptionsMapCopier.copy(options); } @Override public final Builder options(Map options) { this.options = LogConfigurationOptionsMapCopier.copy(options); return this; } public final List getSecretOptions() { List result = SecretListCopier.copyToBuilder(this.secretOptions); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setSecretOptions(Collection secretOptions) { this.secretOptions = SecretListCopier.copyFromBuilder(secretOptions); } @Override public final Builder secretOptions(Collection secretOptions) { this.secretOptions = SecretListCopier.copy(secretOptions); return this; } @Override @SafeVarargs public final Builder secretOptions(Secret... secretOptions) { secretOptions(Arrays.asList(secretOptions)); return this; } @Override @SafeVarargs public final Builder secretOptions(Consumer... secretOptions) { secretOptions(Stream.of(secretOptions).map(c -> Secret.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } @Override public LogConfiguration build() { return new LogConfiguration(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy