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

com.pulumi.alicloud.ram.inputs.RoleState Maven / Gradle / Ivy

There is a newer version: 3.63.0-alpha.1727424957
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.pulumi.alicloud.ram.inputs;

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


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

    public static final RoleState Empty = new RoleState();

    /**
     * The role arn.
     * 
     */
    @Import(name="arn")
    private @Nullable Output arn;

    /**
     * @return The role arn.
     * 
     */
    public Optional> arn() {
        return Optional.ofNullable(this.arn);
    }

    /**
     * Description of the RAM role. This name can have a string of 1 to 1024 characters. **NOTE:** The `description` supports modification since V1.144.0.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return Description of the RAM role. This name can have a string of 1 to 1024 characters. **NOTE:** The `description` supports modification since V1.144.0.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * Authorization strategy of the RAM role. It is required when the `services` and `ram_users` are not specified.
     * 
     */
    @Import(name="document")
    private @Nullable Output document;

    /**
     * @return Authorization strategy of the RAM role. It is required when the `services` and `ram_users` are not specified.
     * 
     */
    public Optional> document() {
        return Optional.ofNullable(this.document);
    }

    /**
     * This parameter is used for resource destroy. Default value is `false`.
     * 
     */
    @Import(name="force")
    private @Nullable Output force;

    /**
     * @return This parameter is used for resource destroy. Default value is `false`.
     * 
     */
    public Optional> force() {
        return Optional.ofNullable(this.force);
    }

    /**
     * The maximum session duration of the RAM role. Valid values: 3600 to 43200. Unit: seconds. Default value: 3600. The default value is used if the parameter is not specified.
     * 
     */
    @Import(name="maxSessionDuration")
    private @Nullable Output maxSessionDuration;

    /**
     * @return The maximum session duration of the RAM role. Valid values: 3600 to 43200. Unit: seconds. Default value: 3600. The default value is used if the parameter is not specified.
     * 
     */
    public Optional> maxSessionDuration() {
        return Optional.ofNullable(this.maxSessionDuration);
    }

    /**
     * Name of the RAM role. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-", "_", and must not begin with a hyphen.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Name of the RAM role. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-", "_", and must not begin with a hyphen.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * (It has been deprecated since version 1.49.0, and use field 'document' to replace.) List of ram users who can assume the RAM role. The format of each item in this list is `acs:ram::${account_id}:root` or `acs:ram::${account_id}:user/${user_name}`, such as `acs:ram::1234567890000:root` and `acs:ram::1234567890001:user/Mary`. The `${user_name}` is the name of a RAM user which must exists in the Alicloud account indicated by the `${account_id}`.
     * 
     * @deprecated
     * Field 'ram_users' has been deprecated from version 1.49.0, and use field 'document' to replace.
     * 
     */
    @Deprecated /* Field 'ram_users' has been deprecated from version 1.49.0, and use field 'document' to replace.  */
    @Import(name="ramUsers")
    private @Nullable Output> ramUsers;

    /**
     * @return (It has been deprecated since version 1.49.0, and use field 'document' to replace.) List of ram users who can assume the RAM role. The format of each item in this list is `acs:ram::${account_id}:root` or `acs:ram::${account_id}:user/${user_name}`, such as `acs:ram::1234567890000:root` and `acs:ram::1234567890001:user/Mary`. The `${user_name}` is the name of a RAM user which must exists in the Alicloud account indicated by the `${account_id}`.
     * 
     * @deprecated
     * Field 'ram_users' has been deprecated from version 1.49.0, and use field 'document' to replace.
     * 
     */
    @Deprecated /* Field 'ram_users' has been deprecated from version 1.49.0, and use field 'document' to replace.  */
    public Optional>> ramUsers() {
        return Optional.ofNullable(this.ramUsers);
    }

    /**
     * The role ID.
     * 
     */
    @Import(name="roleId")
    private @Nullable Output roleId;

    /**
     * @return The role ID.
     * 
     */
    public Optional> roleId() {
        return Optional.ofNullable(this.roleId);
    }

    /**
     * (It has been deprecated since version 1.49.0, and use field 'document' to replace.) List of services which can assume the RAM role. The format of each item in this list is `${service}.aliyuncs.com` or `${account_id}{@literal @}${service}.aliyuncs.com`, such as `ecs.aliyuncs.com` and `1234567890000{@literal @}ots.aliyuncs.com`. The `${service}` can be `ecs`, `log`, `apigateway` and so on, the `${account_id}` refers to someone's Alicloud account id.
     * 
     * @deprecated
     * Field 'services' has been deprecated from version 1.49.0, and use field 'document' to replace.
     * 
     */
    @Deprecated /* Field 'services' has been deprecated from version 1.49.0, and use field 'document' to replace.  */
    @Import(name="services")
    private @Nullable Output> services;

    /**
     * @return (It has been deprecated since version 1.49.0, and use field 'document' to replace.) List of services which can assume the RAM role. The format of each item in this list is `${service}.aliyuncs.com` or `${account_id}{@literal @}${service}.aliyuncs.com`, such as `ecs.aliyuncs.com` and `1234567890000{@literal @}ots.aliyuncs.com`. The `${service}` can be `ecs`, `log`, `apigateway` and so on, the `${account_id}` refers to someone's Alicloud account id.
     * 
     * @deprecated
     * Field 'services' has been deprecated from version 1.49.0, and use field 'document' to replace.
     * 
     */
    @Deprecated /* Field 'services' has been deprecated from version 1.49.0, and use field 'document' to replace.  */
    public Optional>> services() {
        return Optional.ofNullable(this.services);
    }

    /**
     * (It has been deprecated since version 1.49.0, and use field 'document' to replace.) Version of the RAM role policy document. Valid value is `1`. Default value is `1`.
     * 
     * @deprecated
     * Field 'version' has been deprecated from version 1.49.0, and use field 'document' to replace.
     * 
     */
    @Deprecated /* Field 'version' has been deprecated from version 1.49.0, and use field 'document' to replace.  */
    @Import(name="version")
    private @Nullable Output version;

    /**
     * @return (It has been deprecated since version 1.49.0, and use field 'document' to replace.) Version of the RAM role policy document. Valid value is `1`. Default value is `1`.
     * 
     * @deprecated
     * Field 'version' has been deprecated from version 1.49.0, and use field 'document' to replace.
     * 
     */
    @Deprecated /* Field 'version' has been deprecated from version 1.49.0, and use field 'document' to replace.  */
    public Optional> version() {
        return Optional.ofNullable(this.version);
    }

    private RoleState() {}

    private RoleState(RoleState $) {
        this.arn = $.arn;
        this.description = $.description;
        this.document = $.document;
        this.force = $.force;
        this.maxSessionDuration = $.maxSessionDuration;
        this.name = $.name;
        this.ramUsers = $.ramUsers;
        this.roleId = $.roleId;
        this.services = $.services;
        this.version = $.version;
    }

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

    public static final class Builder {
        private RoleState $;

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

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

        /**
         * @param arn The role arn.
         * 
         * @return builder
         * 
         */
        public Builder arn(@Nullable Output arn) {
            $.arn = arn;
            return this;
        }

        /**
         * @param arn The role arn.
         * 
         * @return builder
         * 
         */
        public Builder arn(String arn) {
            return arn(Output.of(arn));
        }

        /**
         * @param description Description of the RAM role. This name can have a string of 1 to 1024 characters. **NOTE:** The `description` supports modification since V1.144.0.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description Description of the RAM role. This name can have a string of 1 to 1024 characters. **NOTE:** The `description` supports modification since V1.144.0.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param document Authorization strategy of the RAM role. It is required when the `services` and `ram_users` are not specified.
         * 
         * @return builder
         * 
         */
        public Builder document(@Nullable Output document) {
            $.document = document;
            return this;
        }

        /**
         * @param document Authorization strategy of the RAM role. It is required when the `services` and `ram_users` are not specified.
         * 
         * @return builder
         * 
         */
        public Builder document(String document) {
            return document(Output.of(document));
        }

        /**
         * @param force This parameter is used for resource destroy. Default value is `false`.
         * 
         * @return builder
         * 
         */
        public Builder force(@Nullable Output force) {
            $.force = force;
            return this;
        }

        /**
         * @param force This parameter is used for resource destroy. Default value is `false`.
         * 
         * @return builder
         * 
         */
        public Builder force(Boolean force) {
            return force(Output.of(force));
        }

        /**
         * @param maxSessionDuration The maximum session duration of the RAM role. Valid values: 3600 to 43200. Unit: seconds. Default value: 3600. The default value is used if the parameter is not specified.
         * 
         * @return builder
         * 
         */
        public Builder maxSessionDuration(@Nullable Output maxSessionDuration) {
            $.maxSessionDuration = maxSessionDuration;
            return this;
        }

        /**
         * @param maxSessionDuration The maximum session duration of the RAM role. Valid values: 3600 to 43200. Unit: seconds. Default value: 3600. The default value is used if the parameter is not specified.
         * 
         * @return builder
         * 
         */
        public Builder maxSessionDuration(Integer maxSessionDuration) {
            return maxSessionDuration(Output.of(maxSessionDuration));
        }

        /**
         * @param name Name of the RAM role. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-", "_", and must not begin with a hyphen.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Name of the RAM role. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-", "_", and must not begin with a hyphen.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param ramUsers (It has been deprecated since version 1.49.0, and use field 'document' to replace.) List of ram users who can assume the RAM role. The format of each item in this list is `acs:ram::${account_id}:root` or `acs:ram::${account_id}:user/${user_name}`, such as `acs:ram::1234567890000:root` and `acs:ram::1234567890001:user/Mary`. The `${user_name}` is the name of a RAM user which must exists in the Alicloud account indicated by the `${account_id}`.
         * 
         * @return builder
         * 
         * @deprecated
         * Field 'ram_users' has been deprecated from version 1.49.0, and use field 'document' to replace.
         * 
         */
        @Deprecated /* Field 'ram_users' has been deprecated from version 1.49.0, and use field 'document' to replace.  */
        public Builder ramUsers(@Nullable Output> ramUsers) {
            $.ramUsers = ramUsers;
            return this;
        }

        /**
         * @param ramUsers (It has been deprecated since version 1.49.0, and use field 'document' to replace.) List of ram users who can assume the RAM role. The format of each item in this list is `acs:ram::${account_id}:root` or `acs:ram::${account_id}:user/${user_name}`, such as `acs:ram::1234567890000:root` and `acs:ram::1234567890001:user/Mary`. The `${user_name}` is the name of a RAM user which must exists in the Alicloud account indicated by the `${account_id}`.
         * 
         * @return builder
         * 
         * @deprecated
         * Field 'ram_users' has been deprecated from version 1.49.0, and use field 'document' to replace.
         * 
         */
        @Deprecated /* Field 'ram_users' has been deprecated from version 1.49.0, and use field 'document' to replace.  */
        public Builder ramUsers(List ramUsers) {
            return ramUsers(Output.of(ramUsers));
        }

        /**
         * @param ramUsers (It has been deprecated since version 1.49.0, and use field 'document' to replace.) List of ram users who can assume the RAM role. The format of each item in this list is `acs:ram::${account_id}:root` or `acs:ram::${account_id}:user/${user_name}`, such as `acs:ram::1234567890000:root` and `acs:ram::1234567890001:user/Mary`. The `${user_name}` is the name of a RAM user which must exists in the Alicloud account indicated by the `${account_id}`.
         * 
         * @return builder
         * 
         * @deprecated
         * Field 'ram_users' has been deprecated from version 1.49.0, and use field 'document' to replace.
         * 
         */
        @Deprecated /* Field 'ram_users' has been deprecated from version 1.49.0, and use field 'document' to replace.  */
        public Builder ramUsers(String... ramUsers) {
            return ramUsers(List.of(ramUsers));
        }

        /**
         * @param roleId The role ID.
         * 
         * @return builder
         * 
         */
        public Builder roleId(@Nullable Output roleId) {
            $.roleId = roleId;
            return this;
        }

        /**
         * @param roleId The role ID.
         * 
         * @return builder
         * 
         */
        public Builder roleId(String roleId) {
            return roleId(Output.of(roleId));
        }

        /**
         * @param services (It has been deprecated since version 1.49.0, and use field 'document' to replace.) List of services which can assume the RAM role. The format of each item in this list is `${service}.aliyuncs.com` or `${account_id}{@literal @}${service}.aliyuncs.com`, such as `ecs.aliyuncs.com` and `1234567890000{@literal @}ots.aliyuncs.com`. The `${service}` can be `ecs`, `log`, `apigateway` and so on, the `${account_id}` refers to someone's Alicloud account id.
         * 
         * @return builder
         * 
         * @deprecated
         * Field 'services' has been deprecated from version 1.49.0, and use field 'document' to replace.
         * 
         */
        @Deprecated /* Field 'services' has been deprecated from version 1.49.0, and use field 'document' to replace.  */
        public Builder services(@Nullable Output> services) {
            $.services = services;
            return this;
        }

        /**
         * @param services (It has been deprecated since version 1.49.0, and use field 'document' to replace.) List of services which can assume the RAM role. The format of each item in this list is `${service}.aliyuncs.com` or `${account_id}{@literal @}${service}.aliyuncs.com`, such as `ecs.aliyuncs.com` and `1234567890000{@literal @}ots.aliyuncs.com`. The `${service}` can be `ecs`, `log`, `apigateway` and so on, the `${account_id}` refers to someone's Alicloud account id.
         * 
         * @return builder
         * 
         * @deprecated
         * Field 'services' has been deprecated from version 1.49.0, and use field 'document' to replace.
         * 
         */
        @Deprecated /* Field 'services' has been deprecated from version 1.49.0, and use field 'document' to replace.  */
        public Builder services(List services) {
            return services(Output.of(services));
        }

        /**
         * @param services (It has been deprecated since version 1.49.0, and use field 'document' to replace.) List of services which can assume the RAM role. The format of each item in this list is `${service}.aliyuncs.com` or `${account_id}{@literal @}${service}.aliyuncs.com`, such as `ecs.aliyuncs.com` and `1234567890000{@literal @}ots.aliyuncs.com`. The `${service}` can be `ecs`, `log`, `apigateway` and so on, the `${account_id}` refers to someone's Alicloud account id.
         * 
         * @return builder
         * 
         * @deprecated
         * Field 'services' has been deprecated from version 1.49.0, and use field 'document' to replace.
         * 
         */
        @Deprecated /* Field 'services' has been deprecated from version 1.49.0, and use field 'document' to replace.  */
        public Builder services(String... services) {
            return services(List.of(services));
        }

        /**
         * @param version (It has been deprecated since version 1.49.0, and use field 'document' to replace.) Version of the RAM role policy document. Valid value is `1`. Default value is `1`.
         * 
         * @return builder
         * 
         * @deprecated
         * Field 'version' has been deprecated from version 1.49.0, and use field 'document' to replace.
         * 
         */
        @Deprecated /* Field 'version' has been deprecated from version 1.49.0, and use field 'document' to replace.  */
        public Builder version(@Nullable Output version) {
            $.version = version;
            return this;
        }

        /**
         * @param version (It has been deprecated since version 1.49.0, and use field 'document' to replace.) Version of the RAM role policy document. Valid value is `1`. Default value is `1`.
         * 
         * @return builder
         * 
         * @deprecated
         * Field 'version' has been deprecated from version 1.49.0, and use field 'document' to replace.
         * 
         */
        @Deprecated /* Field 'version' has been deprecated from version 1.49.0, and use field 'document' to replace.  */
        public Builder version(String version) {
            return version(Output.of(version));
        }

        public RoleState build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy