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

io.github.cdklabs.cdk.verified.permissions.PolicyTemplate Maven / Gradle / Ivy

There is a newer version: 0.1.4
Show newest version
package io.github.cdklabs.cdk.verified.permissions;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-09T15:44:54.917Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdk.verified.permissions.$Module.class, fqn = "@cdklabs/cdk-verified-permissions.PolicyTemplate")
public class PolicyTemplate extends software.amazon.awscdk.Resource implements io.github.cdklabs.cdk.verified.permissions.IPolicyTemplate {

    protected PolicyTemplate(final software.amazon.jsii.JsiiObjectRef objRef) {
        super(objRef);
    }

    protected PolicyTemplate(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
        super(initializationMode);
    }

    /**
     * @param scope This parameter is required.
     * @param id This parameter is required.
     * @param props This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public PolicyTemplate(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.verified.permissions.PolicyTemplateProps props) {
        super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
        software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") });
    }

    /**
     * @param scope This parameter is required.
     * @param id This parameter is required.
     * @param props This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public static @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.verified.permissions.PolicyTemplate fromFile(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.verified.permissions.TemplateFromFileProps props) {
        return software.amazon.jsii.JsiiObject.jsiiStaticCall(io.github.cdklabs.cdk.verified.permissions.PolicyTemplate.class, "fromFile", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.verified.permissions.PolicyTemplate.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") });
    }

    /**
     * (experimental) Creates a PolicyTemplate construct that represents an external Policy Template.
     * 

* @param scope The parent creating construct (usually this). This parameter is required. * @param id The construct's name. This parameter is required. * @param attrs A PolicyTemplateAttributes object. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.verified.permissions.IPolicyTemplate fromPolicyTemplateAttributes(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.verified.permissions.PolicyTemplateAttributes attrs) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(io.github.cdklabs.cdk.verified.permissions.PolicyTemplate.class, "fromPolicyTemplateAttributes", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.verified.permissions.IPolicyTemplate.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(attrs, "attrs is required") }); } /** * (experimental) Create a PolicyTemplate construct that represents an external policy template via policy template id. *

* @param scope The parent creating construct (usually this). This parameter is required. * @param id The construct's name. This parameter is required. * @param policyTemplateId The PolicyTemplate's id. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.verified.permissions.IPolicyTemplate fromPolicyTemplateId(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull java.lang.String policyTemplateId) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(io.github.cdklabs.cdk.verified.permissions.PolicyTemplate.class, "fromPolicyTemplateId", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.verified.permissions.IPolicyTemplate.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(policyTemplateId, "policyTemplateId is required") }); } /** * (experimental) The Policy store that contains the template. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.verified.permissions.IPolicyStore getPolicyStore() { return software.amazon.jsii.Kernel.get(this, "policyStore", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.verified.permissions.IPolicyStore.class)); } /** * (experimental) The ID of the policy template. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.String getPolicyTemplateId() { return software.amazon.jsii.Kernel.get(this, "policyTemplateId", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * (experimental) The statement of the policy template. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.String getStatement() { return software.amazon.jsii.Kernel.get(this, "statement", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * (experimental) Description of the policy template. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.Nullable java.lang.String getDescription() { return software.amazon.jsii.Kernel.get(this, "description", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * (experimental) A fluent builder for {@link io.github.cdklabs.cdk.verified.permissions.PolicyTemplate}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { /** * @return a new instance of {@link Builder}. * @param scope This parameter is required. * @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static Builder create(final software.constructs.Construct scope, final java.lang.String id) { return new Builder(scope, id); } private final software.constructs.Construct scope; private final java.lang.String id; private final io.github.cdklabs.cdk.verified.permissions.PolicyTemplateProps.Builder props; private Builder(final software.constructs.Construct scope, final java.lang.String id) { this.scope = scope; this.id = id; this.props = new io.github.cdklabs.cdk.verified.permissions.PolicyTemplateProps.Builder(); } /** * (experimental) The policy store that contains the template. *

* Default: - The policy store to attach the new or updated policy template. *

* @return {@code this} * @param policyStore The policy store that contains the template. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder policyStore(final io.github.cdklabs.cdk.verified.permissions.IPolicyStore policyStore) { this.props.policyStore(policyStore); return this; } /** * (experimental) Specifies the content that you want to use for the new policy template, written in the Cedar policy language. *

* Default: - The statement to attach to the new or updated policy template. *

* @return {@code this} * @param statement Specifies the content that you want to use for the new policy template, written in the Cedar policy language. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder statement(final java.lang.String statement) { this.props.statement(statement); return this; } /** * (experimental) The description to attach to the new or updated policy template. *

* Default: - No description. *

* @return {@code this} * @param description The description to attach to the new or updated policy template. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder description(final java.lang.String description) { this.props.description(description); return this; } /** * @return a newly built instance of {@link io.github.cdklabs.cdk.verified.permissions.PolicyTemplate}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public io.github.cdklabs.cdk.verified.permissions.PolicyTemplate build() { return new io.github.cdklabs.cdk.verified.permissions.PolicyTemplate( this.scope, this.id, this.props.build() ); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy