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

com.pulumi.aws.iot.PolicyAttachmentArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

There is a newer version: 6.72.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.pulumi.aws.iot;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;


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

    public static final PolicyAttachmentArgs Empty = new PolicyAttachmentArgs();

    /**
     * The name of the policy to attach.
     * 
     */
    @Import(name="policy", required=true)
    private Output policy;

    /**
     * @return The name of the policy to attach.
     * 
     */
    public Output policy() {
        return this.policy;
    }

    /**
     * The identity to which the policy is attached.
     * 
     */
    @Import(name="target", required=true)
    private Output target;

    /**
     * @return The identity to which the policy is attached.
     * 
     */
    public Output target() {
        return this.target;
    }

    private PolicyAttachmentArgs() {}

    private PolicyAttachmentArgs(PolicyAttachmentArgs $) {
        this.policy = $.policy;
        this.target = $.target;
    }

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

    public static final class Builder {
        private PolicyAttachmentArgs $;

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

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

        /**
         * @param policy The name of the policy to attach.
         * 
         * @return builder
         * 
         */
        public Builder policy(Output policy) {
            $.policy = policy;
            return this;
        }

        /**
         * @param policy The name of the policy to attach.
         * 
         * @return builder
         * 
         */
        public Builder policy(String policy) {
            return policy(Output.of(policy));
        }

        /**
         * @param target The identity to which the policy is attached.
         * 
         * @return builder
         * 
         */
        public Builder target(Output target) {
            $.target = target;
            return this;
        }

        /**
         * @param target The identity to which the policy is attached.
         * 
         * @return builder
         * 
         */
        public Builder target(String target) {
            return target(Output.of(target));
        }

        public PolicyAttachmentArgs build() {
            if ($.policy == null) {
                throw new MissingRequiredPropertyException("PolicyAttachmentArgs", "policy");
            }
            if ($.target == null) {
                throw new MissingRequiredPropertyException("PolicyAttachmentArgs", "target");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy