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

com.github.dockerjava.api.command.CreateConfigCmd Maven / Gradle / Ivy

There is a newer version: 3.4.0
Show newest version
package com.github.dockerjava.api.command;

import com.github.dockerjava.api.exception.ConflictException;

import javax.annotation.CheckForNull;
import java.util.Map;

/**
 * Command to create a new config
 *
 * @since {@link RemoteApiVersion#VERSION_1_30}
 */
public interface CreateConfigCmd extends SyncDockerCmd {

    @CheckForNull
    String getName();

    @CheckForNull
    String getData();

    @CheckForNull
    Map getLabels();

    /**
     * @param name
     *            - The new config name.
     */
    CreateConfigCmd withName(String name);

    /**
     * @param data
     *            - The new config data.
     */
    CreateConfigCmd withData(byte[] data);

    /**
     * @param labels
     *            - A mapping of labels keys and values. Labels are a mechanism for applying metadata to Docker objects.
     */
    CreateConfigCmd withLabels(Map labels);

    /**
     * @throws ConflictException Named config already exists
     */
    @Override
    CreateConfigResponse exec() throws ConflictException;

    interface Exec extends DockerCmdSyncExec {
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy