Class LogConfiguration

    • Method Detail

      • logDriver

        public final LogDriver 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, logDriver will return LogDriver.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from logDriverAsString().

        Returns:
        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 Also:
        LogDriver
      • logDriverAsString

        public final String logDriverAsString()

        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, logDriver will return LogDriver.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from logDriverAsString().

        Returns:
        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 Also:
        LogDriver
      • hasOptions

        public final boolean hasOptions()
        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 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.
      • options

        public final Map<String,​String> 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"

        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 hasOptions() method.

        Returns:
        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"
      • hasSecretOptions

        public final boolean hasSecretOptions()
        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 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.
      • secretOptions

        public final List<Secret> secretOptions()

        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 hasSecretOptions() method.

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

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        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.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)