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

com.ovhcloud.pulumi.ovh.CloudProject.ContainerRegistryOIDCArgs Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.ovhcloud.pulumi.ovh.CloudProject;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class ContainerRegistryOIDCArgs extends com.pulumi.resources.ResourceArgs {

    public static final ContainerRegistryOIDCArgs Empty = new ContainerRegistryOIDCArgs();

    /**
     * Delete existing users from Harbor. OIDC can't be enabled if there is at least one user already created. This parameter is only used at OIDC configuration creation. **Changing this value recreates the resource.**
     * 
     */
    @Import(name="deleteUsers")
    private @Nullable Output deleteUsers;

    /**
     * @return Delete existing users from Harbor. OIDC can't be enabled if there is at least one user already created. This parameter is only used at OIDC configuration creation. **Changing this value recreates the resource.**
     * 
     */
    public Optional> deleteUsers() {
        return Optional.ofNullable(this.deleteUsers);
    }

    /**
     * Specify an OIDC admin group name. All OIDC users in this group will have harbor admin privilege. Keep it blank if you do not want to.
     * 
     */
    @Import(name="oidcAdminGroup")
    private @Nullable Output oidcAdminGroup;

    /**
     * @return Specify an OIDC admin group name. All OIDC users in this group will have harbor admin privilege. Keep it blank if you do not want to.
     * 
     */
    public Optional> oidcAdminGroup() {
        return Optional.ofNullable(this.oidcAdminGroup);
    }

    /**
     * Skip the onboarding screen, so user cannot change its username. Username is provided from ID Token.
     * 
     */
    @Import(name="oidcAutoOnboard")
    private @Nullable Output oidcAutoOnboard;

    /**
     * @return Skip the onboarding screen, so user cannot change its username. Username is provided from ID Token.
     * 
     */
    public Optional> oidcAutoOnboard() {
        return Optional.ofNullable(this.oidcAutoOnboard);
    }

    /**
     * The client ID with which Harbor is registered as client application with the OIDC provider.
     * 
     */
    @Import(name="oidcClientId", required=true)
    private Output oidcClientId;

    /**
     * @return The client ID with which Harbor is registered as client application with the OIDC provider.
     * 
     */
    public Output oidcClientId() {
        return this.oidcClientId;
    }

    /**
     * The secret for the Harbor client application.
     * 
     */
    @Import(name="oidcClientSecret", required=true)
    private Output oidcClientSecret;

    /**
     * @return The secret for the Harbor client application.
     * 
     */
    public Output oidcClientSecret() {
        return this.oidcClientSecret;
    }

    /**
     * The URL of an OIDC-compliant server.
     * 
     */
    @Import(name="oidcEndpoint", required=true)
    private Output oidcEndpoint;

    /**
     * @return The URL of an OIDC-compliant server.
     * 
     */
    public Output oidcEndpoint() {
        return this.oidcEndpoint;
    }

    /**
     * The name of Claim in the ID token whose value is the list of group names.
     * 
     */
    @Import(name="oidcGroupsClaim")
    private @Nullable Output oidcGroupsClaim;

    /**
     * @return The name of Claim in the ID token whose value is the list of group names.
     * 
     */
    public Optional> oidcGroupsClaim() {
        return Optional.ofNullable(this.oidcGroupsClaim);
    }

    /**
     * The name of the OIDC provider.
     * 
     */
    @Import(name="oidcName", required=true)
    private Output oidcName;

    /**
     * @return The name of the OIDC provider.
     * 
     */
    public Output oidcName() {
        return this.oidcName;
    }

    /**
     * The scope sent to OIDC server during authentication. It's a comma-separated string that must contain 'openid' and usually also contains 'profile' and 'email'. To obtain refresh tokens it should also contain 'offline_access'.
     * 
     */
    @Import(name="oidcScope", required=true)
    private Output oidcScope;

    /**
     * @return The scope sent to OIDC server during authentication. It's a comma-separated string that must contain 'openid' and usually also contains 'profile' and 'email'. To obtain refresh tokens it should also contain 'offline_access'.
     * 
     */
    public Output oidcScope() {
        return this.oidcScope;
    }

    /**
     * The name of the claim in the ID Token where the username is retrieved from. If not specified, it will default to 'name' (only useful when automatic Onboarding is enabled).
     * 
     */
    @Import(name="oidcUserClaim")
    private @Nullable Output oidcUserClaim;

    /**
     * @return The name of the claim in the ID Token where the username is retrieved from. If not specified, it will default to 'name' (only useful when automatic Onboarding is enabled).
     * 
     */
    public Optional> oidcUserClaim() {
        return Optional.ofNullable(this.oidcUserClaim);
    }

    /**
     * Set it to `false` if your OIDC server is hosted via self-signed certificate.
     * 
     */
    @Import(name="oidcVerifyCert")
    private @Nullable Output oidcVerifyCert;

    /**
     * @return Set it to `false` if your OIDC server is hosted via self-signed certificate.
     * 
     */
    public Optional> oidcVerifyCert() {
        return Optional.ofNullable(this.oidcVerifyCert);
    }

    /**
     * The ID of the Managed Private Registry. **Changing this value recreates the resource.**
     * 
     */
    @Import(name="registryId", required=true)
    private Output registryId;

    /**
     * @return The ID of the Managed Private Registry. **Changing this value recreates the resource.**
     * 
     */
    public Output registryId() {
        return this.registryId;
    }

    /**
     * The ID of the public cloud project. If omitted, the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used. **Changing this value recreates the resource.**
     * 
     */
    @Import(name="serviceName", required=true)
    private Output serviceName;

    /**
     * @return The ID of the public cloud project. If omitted, the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used. **Changing this value recreates the resource.**
     * 
     */
    public Output serviceName() {
        return this.serviceName;
    }

    private ContainerRegistryOIDCArgs() {}

    private ContainerRegistryOIDCArgs(ContainerRegistryOIDCArgs $) {
        this.deleteUsers = $.deleteUsers;
        this.oidcAdminGroup = $.oidcAdminGroup;
        this.oidcAutoOnboard = $.oidcAutoOnboard;
        this.oidcClientId = $.oidcClientId;
        this.oidcClientSecret = $.oidcClientSecret;
        this.oidcEndpoint = $.oidcEndpoint;
        this.oidcGroupsClaim = $.oidcGroupsClaim;
        this.oidcName = $.oidcName;
        this.oidcScope = $.oidcScope;
        this.oidcUserClaim = $.oidcUserClaim;
        this.oidcVerifyCert = $.oidcVerifyCert;
        this.registryId = $.registryId;
        this.serviceName = $.serviceName;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(ContainerRegistryOIDCArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private ContainerRegistryOIDCArgs $;

        public Builder() {
            $ = new ContainerRegistryOIDCArgs();
        }

        public Builder(ContainerRegistryOIDCArgs defaults) {
            $ = new ContainerRegistryOIDCArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param deleteUsers Delete existing users from Harbor. OIDC can't be enabled if there is at least one user already created. This parameter is only used at OIDC configuration creation. **Changing this value recreates the resource.**
         * 
         * @return builder
         * 
         */
        public Builder deleteUsers(@Nullable Output deleteUsers) {
            $.deleteUsers = deleteUsers;
            return this;
        }

        /**
         * @param deleteUsers Delete existing users from Harbor. OIDC can't be enabled if there is at least one user already created. This parameter is only used at OIDC configuration creation. **Changing this value recreates the resource.**
         * 
         * @return builder
         * 
         */
        public Builder deleteUsers(Boolean deleteUsers) {
            return deleteUsers(Output.of(deleteUsers));
        }

        /**
         * @param oidcAdminGroup Specify an OIDC admin group name. All OIDC users in this group will have harbor admin privilege. Keep it blank if you do not want to.
         * 
         * @return builder
         * 
         */
        public Builder oidcAdminGroup(@Nullable Output oidcAdminGroup) {
            $.oidcAdminGroup = oidcAdminGroup;
            return this;
        }

        /**
         * @param oidcAdminGroup Specify an OIDC admin group name. All OIDC users in this group will have harbor admin privilege. Keep it blank if you do not want to.
         * 
         * @return builder
         * 
         */
        public Builder oidcAdminGroup(String oidcAdminGroup) {
            return oidcAdminGroup(Output.of(oidcAdminGroup));
        }

        /**
         * @param oidcAutoOnboard Skip the onboarding screen, so user cannot change its username. Username is provided from ID Token.
         * 
         * @return builder
         * 
         */
        public Builder oidcAutoOnboard(@Nullable Output oidcAutoOnboard) {
            $.oidcAutoOnboard = oidcAutoOnboard;
            return this;
        }

        /**
         * @param oidcAutoOnboard Skip the onboarding screen, so user cannot change its username. Username is provided from ID Token.
         * 
         * @return builder
         * 
         */
        public Builder oidcAutoOnboard(Boolean oidcAutoOnboard) {
            return oidcAutoOnboard(Output.of(oidcAutoOnboard));
        }

        /**
         * @param oidcClientId The client ID with which Harbor is registered as client application with the OIDC provider.
         * 
         * @return builder
         * 
         */
        public Builder oidcClientId(Output oidcClientId) {
            $.oidcClientId = oidcClientId;
            return this;
        }

        /**
         * @param oidcClientId The client ID with which Harbor is registered as client application with the OIDC provider.
         * 
         * @return builder
         * 
         */
        public Builder oidcClientId(String oidcClientId) {
            return oidcClientId(Output.of(oidcClientId));
        }

        /**
         * @param oidcClientSecret The secret for the Harbor client application.
         * 
         * @return builder
         * 
         */
        public Builder oidcClientSecret(Output oidcClientSecret) {
            $.oidcClientSecret = oidcClientSecret;
            return this;
        }

        /**
         * @param oidcClientSecret The secret for the Harbor client application.
         * 
         * @return builder
         * 
         */
        public Builder oidcClientSecret(String oidcClientSecret) {
            return oidcClientSecret(Output.of(oidcClientSecret));
        }

        /**
         * @param oidcEndpoint The URL of an OIDC-compliant server.
         * 
         * @return builder
         * 
         */
        public Builder oidcEndpoint(Output oidcEndpoint) {
            $.oidcEndpoint = oidcEndpoint;
            return this;
        }

        /**
         * @param oidcEndpoint The URL of an OIDC-compliant server.
         * 
         * @return builder
         * 
         */
        public Builder oidcEndpoint(String oidcEndpoint) {
            return oidcEndpoint(Output.of(oidcEndpoint));
        }

        /**
         * @param oidcGroupsClaim The name of Claim in the ID token whose value is the list of group names.
         * 
         * @return builder
         * 
         */
        public Builder oidcGroupsClaim(@Nullable Output oidcGroupsClaim) {
            $.oidcGroupsClaim = oidcGroupsClaim;
            return this;
        }

        /**
         * @param oidcGroupsClaim The name of Claim in the ID token whose value is the list of group names.
         * 
         * @return builder
         * 
         */
        public Builder oidcGroupsClaim(String oidcGroupsClaim) {
            return oidcGroupsClaim(Output.of(oidcGroupsClaim));
        }

        /**
         * @param oidcName The name of the OIDC provider.
         * 
         * @return builder
         * 
         */
        public Builder oidcName(Output oidcName) {
            $.oidcName = oidcName;
            return this;
        }

        /**
         * @param oidcName The name of the OIDC provider.
         * 
         * @return builder
         * 
         */
        public Builder oidcName(String oidcName) {
            return oidcName(Output.of(oidcName));
        }

        /**
         * @param oidcScope The scope sent to OIDC server during authentication. It's a comma-separated string that must contain 'openid' and usually also contains 'profile' and 'email'. To obtain refresh tokens it should also contain 'offline_access'.
         * 
         * @return builder
         * 
         */
        public Builder oidcScope(Output oidcScope) {
            $.oidcScope = oidcScope;
            return this;
        }

        /**
         * @param oidcScope The scope sent to OIDC server during authentication. It's a comma-separated string that must contain 'openid' and usually also contains 'profile' and 'email'. To obtain refresh tokens it should also contain 'offline_access'.
         * 
         * @return builder
         * 
         */
        public Builder oidcScope(String oidcScope) {
            return oidcScope(Output.of(oidcScope));
        }

        /**
         * @param oidcUserClaim The name of the claim in the ID Token where the username is retrieved from. If not specified, it will default to 'name' (only useful when automatic Onboarding is enabled).
         * 
         * @return builder
         * 
         */
        public Builder oidcUserClaim(@Nullable Output oidcUserClaim) {
            $.oidcUserClaim = oidcUserClaim;
            return this;
        }

        /**
         * @param oidcUserClaim The name of the claim in the ID Token where the username is retrieved from. If not specified, it will default to 'name' (only useful when automatic Onboarding is enabled).
         * 
         * @return builder
         * 
         */
        public Builder oidcUserClaim(String oidcUserClaim) {
            return oidcUserClaim(Output.of(oidcUserClaim));
        }

        /**
         * @param oidcVerifyCert Set it to `false` if your OIDC server is hosted via self-signed certificate.
         * 
         * @return builder
         * 
         */
        public Builder oidcVerifyCert(@Nullable Output oidcVerifyCert) {
            $.oidcVerifyCert = oidcVerifyCert;
            return this;
        }

        /**
         * @param oidcVerifyCert Set it to `false` if your OIDC server is hosted via self-signed certificate.
         * 
         * @return builder
         * 
         */
        public Builder oidcVerifyCert(Boolean oidcVerifyCert) {
            return oidcVerifyCert(Output.of(oidcVerifyCert));
        }

        /**
         * @param registryId The ID of the Managed Private Registry. **Changing this value recreates the resource.**
         * 
         * @return builder
         * 
         */
        public Builder registryId(Output registryId) {
            $.registryId = registryId;
            return this;
        }

        /**
         * @param registryId The ID of the Managed Private Registry. **Changing this value recreates the resource.**
         * 
         * @return builder
         * 
         */
        public Builder registryId(String registryId) {
            return registryId(Output.of(registryId));
        }

        /**
         * @param serviceName The ID of the public cloud project. If omitted, the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used. **Changing this value recreates the resource.**
         * 
         * @return builder
         * 
         */
        public Builder serviceName(Output serviceName) {
            $.serviceName = serviceName;
            return this;
        }

        /**
         * @param serviceName The ID of the public cloud project. If omitted, the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used. **Changing this value recreates the resource.**
         * 
         * @return builder
         * 
         */
        public Builder serviceName(String serviceName) {
            return serviceName(Output.of(serviceName));
        }

        public ContainerRegistryOIDCArgs build() {
            if ($.oidcClientId == null) {
                throw new MissingRequiredPropertyException("ContainerRegistryOIDCArgs", "oidcClientId");
            }
            if ($.oidcClientSecret == null) {
                throw new MissingRequiredPropertyException("ContainerRegistryOIDCArgs", "oidcClientSecret");
            }
            if ($.oidcEndpoint == null) {
                throw new MissingRequiredPropertyException("ContainerRegistryOIDCArgs", "oidcEndpoint");
            }
            if ($.oidcName == null) {
                throw new MissingRequiredPropertyException("ContainerRegistryOIDCArgs", "oidcName");
            }
            if ($.oidcScope == null) {
                throw new MissingRequiredPropertyException("ContainerRegistryOIDCArgs", "oidcScope");
            }
            if ($.registryId == null) {
                throw new MissingRequiredPropertyException("ContainerRegistryOIDCArgs", "registryId");
            }
            if ($.serviceName == null) {
                throw new MissingRequiredPropertyException("ContainerRegistryOIDCArgs", "serviceName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy