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

com.pulumi.azurenative.cdn.Origin Maven / Gradle / Ivy

There is a newer version: 2.78.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.azurenative.cdn;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.cdn.OriginArgs;
import com.pulumi.azurenative.cdn.outputs.SystemDataResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not have the requested content cached, they attempt to fetch it from one or more of the configured origins.
 * Azure REST API version: 2023-05-01. Prior API version in Azure Native 1.x: 2020-09-01.
 * 
 * Other available API versions: 2023-07-01-preview, 2024-02-01, 2024-05-01-preview, 2024-06-01-preview, 2024-09-01.
 * 
 * ## Example Usage
 * ### Origins_Create
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.cdn.Origin;
 * import com.pulumi.azurenative.cdn.OriginArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var origin = new Origin("origin", OriginArgs.builder()
 *             .enabled(true)
 *             .endpointName("endpoint1")
 *             .hostName("www.someDomain.net")
 *             .httpPort(80)
 *             .httpsPort(443)
 *             .originHostHeader("www.someDomain.net")
 *             .originName("www-someDomain-net")
 *             .priority(1)
 *             .privateLinkApprovalMessage("Please approve the connection request for this Private Link")
 *             .privateLinkLocation("eastus")
 *             .privateLinkResourceId("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1")
 *             .profileName("profile1")
 *             .resourceGroupName("RG")
 *             .weight(50)
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:cdn:Origin www-someDomain-net /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName} * ``` * */ @ResourceType(type="azure-native:cdn:Origin") public class Origin extends com.pulumi.resources.CustomResource { /** * Origin is enabled for load balancing or not * */ @Export(name="enabled", refs={Boolean.class}, tree="[0]") private Output enabled; /** * @return Origin is enabled for load balancing or not * */ public Output> enabled() { return Codegen.optional(this.enabled); } /** * The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. * */ @Export(name="hostName", refs={String.class}, tree="[0]") private Output hostName; /** * @return The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. * */ public Output hostName() { return this.hostName; } /** * The value of the HTTP port. Must be between 1 and 65535. * */ @Export(name="httpPort", refs={Integer.class}, tree="[0]") private Output httpPort; /** * @return The value of the HTTP port. Must be between 1 and 65535. * */ public Output> httpPort() { return Codegen.optional(this.httpPort); } /** * The value of the HTTPS port. Must be between 1 and 65535. * */ @Export(name="httpsPort", refs={Integer.class}, tree="[0]") private Output httpsPort; /** * @return The value of the HTTPS port. Must be between 1 and 65535. * */ public Output> httpsPort() { return Codegen.optional(this.httpsPort); } /** * Resource name. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Resource name. * */ public Output name() { return this.name; } /** * The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint * */ @Export(name="originHostHeader", refs={String.class}, tree="[0]") private Output originHostHeader; /** * @return The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint * */ public Output> originHostHeader() { return Codegen.optional(this.originHostHeader); } /** * Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 * */ @Export(name="priority", refs={Integer.class}, tree="[0]") private Output priority; /** * @return Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 * */ public Output> priority() { return Codegen.optional(this.priority); } /** * The approval status for the connection to the Private Link * */ @Export(name="privateEndpointStatus", refs={String.class}, tree="[0]") private Output privateEndpointStatus; /** * @return The approval status for the connection to the Private Link * */ public Output privateEndpointStatus() { return this.privateEndpointStatus; } /** * The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' * */ @Export(name="privateLinkAlias", refs={String.class}, tree="[0]") private Output privateLinkAlias; /** * @return The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' * */ public Output> privateLinkAlias() { return Codegen.optional(this.privateLinkAlias); } /** * A custom message to be included in the approval request to connect to the Private Link. * */ @Export(name="privateLinkApprovalMessage", refs={String.class}, tree="[0]") private Output privateLinkApprovalMessage; /** * @return A custom message to be included in the approval request to connect to the Private Link. * */ public Output> privateLinkApprovalMessage() { return Codegen.optional(this.privateLinkApprovalMessage); } /** * The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated * */ @Export(name="privateLinkLocation", refs={String.class}, tree="[0]") private Output privateLinkLocation; /** * @return The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated * */ public Output> privateLinkLocation() { return Codegen.optional(this.privateLinkLocation); } /** * The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' * */ @Export(name="privateLinkResourceId", refs={String.class}, tree="[0]") private Output privateLinkResourceId; /** * @return The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' * */ public Output> privateLinkResourceId() { return Codegen.optional(this.privateLinkResourceId); } /** * Provisioning status of the origin. * */ @Export(name="provisioningState", refs={String.class}, tree="[0]") private Output provisioningState; /** * @return Provisioning status of the origin. * */ public Output provisioningState() { return this.provisioningState; } /** * Resource status of the origin. * */ @Export(name="resourceState", refs={String.class}, tree="[0]") private Output resourceState; /** * @return Resource status of the origin. * */ public Output resourceState() { return this.resourceState; } /** * Read only system data * */ @Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]") private Output systemData; /** * @return Read only system data * */ public Output systemData() { return this.systemData; } /** * Resource type. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return Resource type. * */ public Output type() { return this.type; } /** * Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 * */ @Export(name="weight", refs={Integer.class}, tree="[0]") private Output weight; /** * @return Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 * */ public Output> weight() { return Codegen.optional(this.weight); } /** * * @param name The _unique_ name of the resulting resource. */ public Origin(java.lang.String name) { this(name, OriginArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Origin(java.lang.String name, OriginArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public Origin(java.lang.String name, OriginArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:cdn:Origin", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Origin(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:cdn:Origin", name, null, makeResourceOptions(options, id), false); } private static OriginArgs makeArgs(OriginArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? OriginArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:cdn/v20150601:Origin").build()), Output.of(Alias.builder().type("azure-native:cdn/v20160402:Origin").build()), Output.of(Alias.builder().type("azure-native:cdn/v20191231:Origin").build()), Output.of(Alias.builder().type("azure-native:cdn/v20200331:Origin").build()), Output.of(Alias.builder().type("azure-native:cdn/v20200415:Origin").build()), Output.of(Alias.builder().type("azure-native:cdn/v20200901:Origin").build()), Output.of(Alias.builder().type("azure-native:cdn/v20210601:Origin").build()), Output.of(Alias.builder().type("azure-native:cdn/v20220501preview:Origin").build()), Output.of(Alias.builder().type("azure-native:cdn/v20221101preview:Origin").build()), Output.of(Alias.builder().type("azure-native:cdn/v20230501:Origin").build()), Output.of(Alias.builder().type("azure-native:cdn/v20230701preview:Origin").build()), Output.of(Alias.builder().type("azure-native:cdn/v20240201:Origin").build()), Output.of(Alias.builder().type("azure-native:cdn/v20240501preview:Origin").build()), Output.of(Alias.builder().type("azure-native:cdn/v20240601preview:Origin").build()), Output.of(Alias.builder().type("azure-native:cdn/v20240901:Origin").build()) )) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param options Optional settings to control the behavior of the CustomResource. */ public static Origin get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Origin(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy