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

com.pulumi.azure.apimanagement.ApiArgs Maven / Gradle / Ivy

// *** 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.azure.apimanagement;

import com.pulumi.azure.apimanagement.inputs.ApiContactArgs;
import com.pulumi.azure.apimanagement.inputs.ApiImportArgs;
import com.pulumi.azure.apimanagement.inputs.ApiLicenseArgs;
import com.pulumi.azure.apimanagement.inputs.ApiOauth2AuthorizationArgs;
import com.pulumi.azure.apimanagement.inputs.ApiOpenidAuthenticationArgs;
import com.pulumi.azure.apimanagement.inputs.ApiSubscriptionKeyParameterNamesArgs;
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.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final ApiArgs Empty = new ApiArgs();

    /**
     * The Name of the API Management Service where this API should be created. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="apiManagementName", required=true)
    private Output apiManagementName;

    /**
     * @return The Name of the API Management Service where this API should be created. Changing this forces a new resource to be created.
     * 
     */
    public Output apiManagementName() {
        return this.apiManagementName;
    }

    /**
     * Type of API. Possible values are `graphql`, `http`, `soap`, and `websocket`. Defaults to `http`.
     * 
     */
    @Import(name="apiType")
    private @Nullable Output apiType;

    /**
     * @return Type of API. Possible values are `graphql`, `http`, `soap`, and `websocket`. Defaults to `http`.
     * 
     */
    public Optional> apiType() {
        return Optional.ofNullable(this.apiType);
    }

    /**
     * A `contact` block as documented below.
     * 
     */
    @Import(name="contact")
    private @Nullable Output contact;

    /**
     * @return A `contact` block as documented below.
     * 
     */
    public Optional> contact() {
        return Optional.ofNullable(this.contact);
    }

    /**
     * A description of the API Management API, which may include HTML formatting tags.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return A description of the API Management API, which may include HTML formatting tags.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * The display name of the API.
     * 
     */
    @Import(name="displayName")
    private @Nullable Output displayName;

    /**
     * @return The display name of the API.
     * 
     */
    public Optional> displayName() {
        return Optional.ofNullable(this.displayName);
    }

    /**
     * A `import` block as documented below.
     * 
     */
    @Import(name="import")
    private @Nullable Output import_;

    /**
     * @return A `import` block as documented below.
     * 
     */
    public Optional> import_() {
        return Optional.ofNullable(this.import_);
    }

    /**
     * A `license` block as documented below.
     * 
     */
    @Import(name="license")
    private @Nullable Output license;

    /**
     * @return A `license` block as documented below.
     * 
     */
    public Optional> license() {
        return Optional.ofNullable(this.license);
    }

    /**
     * The name of the API Management API. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The name of the API Management API. Changing this forces a new resource to be created.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * An `oauth2_authorization` block as documented below.
     * 
     */
    @Import(name="oauth2Authorization")
    private @Nullable Output oauth2Authorization;

    /**
     * @return An `oauth2_authorization` block as documented below.
     * 
     */
    public Optional> oauth2Authorization() {
        return Optional.ofNullable(this.oauth2Authorization);
    }

    /**
     * An `openid_authentication` block as documented below.
     * 
     */
    @Import(name="openidAuthentication")
    private @Nullable Output openidAuthentication;

    /**
     * @return An `openid_authentication` block as documented below.
     * 
     */
    public Optional> openidAuthentication() {
        return Optional.ofNullable(this.openidAuthentication);
    }

    /**
     * The Path for this API Management API, which is a relative URL which uniquely identifies this API and all of its resource paths within the API Management Service.
     * 
     */
    @Import(name="path")
    private @Nullable Output path;

    /**
     * @return The Path for this API Management API, which is a relative URL which uniquely identifies this API and all of its resource paths within the API Management Service.
     * 
     */
    public Optional> path() {
        return Optional.ofNullable(this.path);
    }

    /**
     * A list of protocols the operations in this API can be invoked. Possible values are `http`, `https`, `ws`, and `wss`.
     * 
     * > **NOTE:** `display_name`, `path` and `protocols` are required when `source_api_id` is not set.
     * 
     */
    @Import(name="protocols")
    private @Nullable Output> protocols;

    /**
     * @return A list of protocols the operations in this API can be invoked. Possible values are `http`, `https`, `ws`, and `wss`.
     * 
     * > **NOTE:** `display_name`, `path` and `protocols` are required when `source_api_id` is not set.
     * 
     */
    public Optional>> protocols() {
        return Optional.ofNullable(this.protocols);
    }

    /**
     * The Name of the Resource Group where the API Management API exists. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The Name of the Resource Group where the API Management API exists. Changing this forces a new resource to be created.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * The Revision which used for this API. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="revision", required=true)
    private Output revision;

    /**
     * @return The Revision which used for this API. Changing this forces a new resource to be created.
     * 
     */
    public Output revision() {
        return this.revision;
    }

    /**
     * The description of the API Revision of the API Management API.
     * 
     */
    @Import(name="revisionDescription")
    private @Nullable Output revisionDescription;

    /**
     * @return The description of the API Revision of the API Management API.
     * 
     */
    public Optional> revisionDescription() {
        return Optional.ofNullable(this.revisionDescription);
    }

    /**
     * Absolute URL of the backend service implementing this API.
     * 
     */
    @Import(name="serviceUrl")
    private @Nullable Output serviceUrl;

    /**
     * @return Absolute URL of the backend service implementing this API.
     * 
     */
    public Optional> serviceUrl() {
        return Optional.ofNullable(this.serviceUrl);
    }

    /**
     * The API id of the source API, which could be in format `azurerm_api_management_api.example.id` or in format `azurerm_api_management_api.example.id;rev=1`
     * 
     */
    @Import(name="sourceApiId")
    private @Nullable Output sourceApiId;

    /**
     * @return The API id of the source API, which could be in format `azurerm_api_management_api.example.id` or in format `azurerm_api_management_api.example.id;rev=1`
     * 
     */
    public Optional> sourceApiId() {
        return Optional.ofNullable(this.sourceApiId);
    }

    /**
     * A `subscription_key_parameter_names` block as documented below.
     * 
     */
    @Import(name="subscriptionKeyParameterNames")
    private @Nullable Output subscriptionKeyParameterNames;

    /**
     * @return A `subscription_key_parameter_names` block as documented below.
     * 
     */
    public Optional> subscriptionKeyParameterNames() {
        return Optional.ofNullable(this.subscriptionKeyParameterNames);
    }

    /**
     * Should this API require a subscription key? Defaults to `true`.
     * 
     */
    @Import(name="subscriptionRequired")
    private @Nullable Output subscriptionRequired;

    /**
     * @return Should this API require a subscription key? Defaults to `true`.
     * 
     */
    public Optional> subscriptionRequired() {
        return Optional.ofNullable(this.subscriptionRequired);
    }

    /**
     * Absolute URL of the Terms of Service for the API.
     * 
     */
    @Import(name="termsOfServiceUrl")
    private @Nullable Output termsOfServiceUrl;

    /**
     * @return Absolute URL of the Terms of Service for the API.
     * 
     */
    public Optional> termsOfServiceUrl() {
        return Optional.ofNullable(this.termsOfServiceUrl);
    }

    /**
     * The Version number of this API, if this API is versioned.
     * 
     */
    @Import(name="version")
    private @Nullable Output version;

    /**
     * @return The Version number of this API, if this API is versioned.
     * 
     */
    public Optional> version() {
        return Optional.ofNullable(this.version);
    }

    /**
     * The description of the API Version of the API Management API.
     * 
     */
    @Import(name="versionDescription")
    private @Nullable Output versionDescription;

    /**
     * @return The description of the API Version of the API Management API.
     * 
     */
    public Optional> versionDescription() {
        return Optional.ofNullable(this.versionDescription);
    }

    /**
     * The ID of the Version Set which this API is associated with.
     * 
     * > **NOTE:** When `version` is set, `version_set_id` must also be specified
     * 
     */
    @Import(name="versionSetId")
    private @Nullable Output versionSetId;

    /**
     * @return The ID of the Version Set which this API is associated with.
     * 
     * > **NOTE:** When `version` is set, `version_set_id` must also be specified
     * 
     */
    public Optional> versionSetId() {
        return Optional.ofNullable(this.versionSetId);
    }

    private ApiArgs() {}

    private ApiArgs(ApiArgs $) {
        this.apiManagementName = $.apiManagementName;
        this.apiType = $.apiType;
        this.contact = $.contact;
        this.description = $.description;
        this.displayName = $.displayName;
        this.import_ = $.import_;
        this.license = $.license;
        this.name = $.name;
        this.oauth2Authorization = $.oauth2Authorization;
        this.openidAuthentication = $.openidAuthentication;
        this.path = $.path;
        this.protocols = $.protocols;
        this.resourceGroupName = $.resourceGroupName;
        this.revision = $.revision;
        this.revisionDescription = $.revisionDescription;
        this.serviceUrl = $.serviceUrl;
        this.sourceApiId = $.sourceApiId;
        this.subscriptionKeyParameterNames = $.subscriptionKeyParameterNames;
        this.subscriptionRequired = $.subscriptionRequired;
        this.termsOfServiceUrl = $.termsOfServiceUrl;
        this.version = $.version;
        this.versionDescription = $.versionDescription;
        this.versionSetId = $.versionSetId;
    }

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

    public static final class Builder {
        private ApiArgs $;

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

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

        /**
         * @param apiManagementName The Name of the API Management Service where this API should be created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder apiManagementName(Output apiManagementName) {
            $.apiManagementName = apiManagementName;
            return this;
        }

        /**
         * @param apiManagementName The Name of the API Management Service where this API should be created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder apiManagementName(String apiManagementName) {
            return apiManagementName(Output.of(apiManagementName));
        }

        /**
         * @param apiType Type of API. Possible values are `graphql`, `http`, `soap`, and `websocket`. Defaults to `http`.
         * 
         * @return builder
         * 
         */
        public Builder apiType(@Nullable Output apiType) {
            $.apiType = apiType;
            return this;
        }

        /**
         * @param apiType Type of API. Possible values are `graphql`, `http`, `soap`, and `websocket`. Defaults to `http`.
         * 
         * @return builder
         * 
         */
        public Builder apiType(String apiType) {
            return apiType(Output.of(apiType));
        }

        /**
         * @param contact A `contact` block as documented below.
         * 
         * @return builder
         * 
         */
        public Builder contact(@Nullable Output contact) {
            $.contact = contact;
            return this;
        }

        /**
         * @param contact A `contact` block as documented below.
         * 
         * @return builder
         * 
         */
        public Builder contact(ApiContactArgs contact) {
            return contact(Output.of(contact));
        }

        /**
         * @param description A description of the API Management API, which may include HTML formatting tags.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description A description of the API Management API, which may include HTML formatting tags.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param displayName The display name of the API.
         * 
         * @return builder
         * 
         */
        public Builder displayName(@Nullable Output displayName) {
            $.displayName = displayName;
            return this;
        }

        /**
         * @param displayName The display name of the API.
         * 
         * @return builder
         * 
         */
        public Builder displayName(String displayName) {
            return displayName(Output.of(displayName));
        }

        /**
         * @param import_ A `import` block as documented below.
         * 
         * @return builder
         * 
         */
        public Builder import_(@Nullable Output import_) {
            $.import_ = import_;
            return this;
        }

        /**
         * @param import_ A `import` block as documented below.
         * 
         * @return builder
         * 
         */
        public Builder import_(ApiImportArgs import_) {
            return import_(Output.of(import_));
        }

        /**
         * @param license A `license` block as documented below.
         * 
         * @return builder
         * 
         */
        public Builder license(@Nullable Output license) {
            $.license = license;
            return this;
        }

        /**
         * @param license A `license` block as documented below.
         * 
         * @return builder
         * 
         */
        public Builder license(ApiLicenseArgs license) {
            return license(Output.of(license));
        }

        /**
         * @param name The name of the API Management API. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name of the API Management API. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param oauth2Authorization An `oauth2_authorization` block as documented below.
         * 
         * @return builder
         * 
         */
        public Builder oauth2Authorization(@Nullable Output oauth2Authorization) {
            $.oauth2Authorization = oauth2Authorization;
            return this;
        }

        /**
         * @param oauth2Authorization An `oauth2_authorization` block as documented below.
         * 
         * @return builder
         * 
         */
        public Builder oauth2Authorization(ApiOauth2AuthorizationArgs oauth2Authorization) {
            return oauth2Authorization(Output.of(oauth2Authorization));
        }

        /**
         * @param openidAuthentication An `openid_authentication` block as documented below.
         * 
         * @return builder
         * 
         */
        public Builder openidAuthentication(@Nullable Output openidAuthentication) {
            $.openidAuthentication = openidAuthentication;
            return this;
        }

        /**
         * @param openidAuthentication An `openid_authentication` block as documented below.
         * 
         * @return builder
         * 
         */
        public Builder openidAuthentication(ApiOpenidAuthenticationArgs openidAuthentication) {
            return openidAuthentication(Output.of(openidAuthentication));
        }

        /**
         * @param path The Path for this API Management API, which is a relative URL which uniquely identifies this API and all of its resource paths within the API Management Service.
         * 
         * @return builder
         * 
         */
        public Builder path(@Nullable Output path) {
            $.path = path;
            return this;
        }

        /**
         * @param path The Path for this API Management API, which is a relative URL which uniquely identifies this API and all of its resource paths within the API Management Service.
         * 
         * @return builder
         * 
         */
        public Builder path(String path) {
            return path(Output.of(path));
        }

        /**
         * @param protocols A list of protocols the operations in this API can be invoked. Possible values are `http`, `https`, `ws`, and `wss`.
         * 
         * > **NOTE:** `display_name`, `path` and `protocols` are required when `source_api_id` is not set.
         * 
         * @return builder
         * 
         */
        public Builder protocols(@Nullable Output> protocols) {
            $.protocols = protocols;
            return this;
        }

        /**
         * @param protocols A list of protocols the operations in this API can be invoked. Possible values are `http`, `https`, `ws`, and `wss`.
         * 
         * > **NOTE:** `display_name`, `path` and `protocols` are required when `source_api_id` is not set.
         * 
         * @return builder
         * 
         */
        public Builder protocols(List protocols) {
            return protocols(Output.of(protocols));
        }

        /**
         * @param protocols A list of protocols the operations in this API can be invoked. Possible values are `http`, `https`, `ws`, and `wss`.
         * 
         * > **NOTE:** `display_name`, `path` and `protocols` are required when `source_api_id` is not set.
         * 
         * @return builder
         * 
         */
        public Builder protocols(String... protocols) {
            return protocols(List.of(protocols));
        }

        /**
         * @param resourceGroupName The Name of the Resource Group where the API Management API exists. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The Name of the Resource Group where the API Management API exists. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param revision The Revision which used for this API. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder revision(Output revision) {
            $.revision = revision;
            return this;
        }

        /**
         * @param revision The Revision which used for this API. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder revision(String revision) {
            return revision(Output.of(revision));
        }

        /**
         * @param revisionDescription The description of the API Revision of the API Management API.
         * 
         * @return builder
         * 
         */
        public Builder revisionDescription(@Nullable Output revisionDescription) {
            $.revisionDescription = revisionDescription;
            return this;
        }

        /**
         * @param revisionDescription The description of the API Revision of the API Management API.
         * 
         * @return builder
         * 
         */
        public Builder revisionDescription(String revisionDescription) {
            return revisionDescription(Output.of(revisionDescription));
        }

        /**
         * @param serviceUrl Absolute URL of the backend service implementing this API.
         * 
         * @return builder
         * 
         */
        public Builder serviceUrl(@Nullable Output serviceUrl) {
            $.serviceUrl = serviceUrl;
            return this;
        }

        /**
         * @param serviceUrl Absolute URL of the backend service implementing this API.
         * 
         * @return builder
         * 
         */
        public Builder serviceUrl(String serviceUrl) {
            return serviceUrl(Output.of(serviceUrl));
        }

        /**
         * @param sourceApiId The API id of the source API, which could be in format `azurerm_api_management_api.example.id` or in format `azurerm_api_management_api.example.id;rev=1`
         * 
         * @return builder
         * 
         */
        public Builder sourceApiId(@Nullable Output sourceApiId) {
            $.sourceApiId = sourceApiId;
            return this;
        }

        /**
         * @param sourceApiId The API id of the source API, which could be in format `azurerm_api_management_api.example.id` or in format `azurerm_api_management_api.example.id;rev=1`
         * 
         * @return builder
         * 
         */
        public Builder sourceApiId(String sourceApiId) {
            return sourceApiId(Output.of(sourceApiId));
        }

        /**
         * @param subscriptionKeyParameterNames A `subscription_key_parameter_names` block as documented below.
         * 
         * @return builder
         * 
         */
        public Builder subscriptionKeyParameterNames(@Nullable Output subscriptionKeyParameterNames) {
            $.subscriptionKeyParameterNames = subscriptionKeyParameterNames;
            return this;
        }

        /**
         * @param subscriptionKeyParameterNames A `subscription_key_parameter_names` block as documented below.
         * 
         * @return builder
         * 
         */
        public Builder subscriptionKeyParameterNames(ApiSubscriptionKeyParameterNamesArgs subscriptionKeyParameterNames) {
            return subscriptionKeyParameterNames(Output.of(subscriptionKeyParameterNames));
        }

        /**
         * @param subscriptionRequired Should this API require a subscription key? Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder subscriptionRequired(@Nullable Output subscriptionRequired) {
            $.subscriptionRequired = subscriptionRequired;
            return this;
        }

        /**
         * @param subscriptionRequired Should this API require a subscription key? Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder subscriptionRequired(Boolean subscriptionRequired) {
            return subscriptionRequired(Output.of(subscriptionRequired));
        }

        /**
         * @param termsOfServiceUrl Absolute URL of the Terms of Service for the API.
         * 
         * @return builder
         * 
         */
        public Builder termsOfServiceUrl(@Nullable Output termsOfServiceUrl) {
            $.termsOfServiceUrl = termsOfServiceUrl;
            return this;
        }

        /**
         * @param termsOfServiceUrl Absolute URL of the Terms of Service for the API.
         * 
         * @return builder
         * 
         */
        public Builder termsOfServiceUrl(String termsOfServiceUrl) {
            return termsOfServiceUrl(Output.of(termsOfServiceUrl));
        }

        /**
         * @param version The Version number of this API, if this API is versioned.
         * 
         * @return builder
         * 
         */
        public Builder version(@Nullable Output version) {
            $.version = version;
            return this;
        }

        /**
         * @param version The Version number of this API, if this API is versioned.
         * 
         * @return builder
         * 
         */
        public Builder version(String version) {
            return version(Output.of(version));
        }

        /**
         * @param versionDescription The description of the API Version of the API Management API.
         * 
         * @return builder
         * 
         */
        public Builder versionDescription(@Nullable Output versionDescription) {
            $.versionDescription = versionDescription;
            return this;
        }

        /**
         * @param versionDescription The description of the API Version of the API Management API.
         * 
         * @return builder
         * 
         */
        public Builder versionDescription(String versionDescription) {
            return versionDescription(Output.of(versionDescription));
        }

        /**
         * @param versionSetId The ID of the Version Set which this API is associated with.
         * 
         * > **NOTE:** When `version` is set, `version_set_id` must also be specified
         * 
         * @return builder
         * 
         */
        public Builder versionSetId(@Nullable Output versionSetId) {
            $.versionSetId = versionSetId;
            return this;
        }

        /**
         * @param versionSetId The ID of the Version Set which this API is associated with.
         * 
         * > **NOTE:** When `version` is set, `version_set_id` must also be specified
         * 
         * @return builder
         * 
         */
        public Builder versionSetId(String versionSetId) {
            return versionSetId(Output.of(versionSetId));
        }

        public ApiArgs build() {
            if ($.apiManagementName == null) {
                throw new MissingRequiredPropertyException("ApiArgs", "apiManagementName");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("ApiArgs", "resourceGroupName");
            }
            if ($.revision == null) {
                throw new MissingRequiredPropertyException("ApiArgs", "revision");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy