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

com.pulumi.azurenative.costmanagement.ScheduledAction Maven / Gradle / Ivy

There is a newer version: 2.82.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.costmanagement;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.costmanagement.ScheduledActionArgs;
import com.pulumi.azurenative.costmanagement.outputs.FileDestinationResponse;
import com.pulumi.azurenative.costmanagement.outputs.NotificationPropertiesResponse;
import com.pulumi.azurenative.costmanagement.outputs.SchedulePropertiesResponse;
import com.pulumi.azurenative.costmanagement.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.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Scheduled action definition.
 * Azure REST API version: 2023-03-01. Prior API version in Azure Native 1.x: 2022-04-01-preview.
 * 
 * Other available API versions: 2023-04-01-preview, 2023-07-01-preview, 2023-08-01, 2023-09-01, 2023-11-01.
 * 
 * ## Example Usage
 * ### CreateOrUpdatePrivateScheduledAction
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.costmanagement.ScheduledAction;
 * import com.pulumi.azurenative.costmanagement.ScheduledActionArgs;
 * import com.pulumi.azurenative.costmanagement.inputs.NotificationPropertiesArgs;
 * import com.pulumi.azurenative.costmanagement.inputs.SchedulePropertiesArgs;
 * 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 }{{@code
 *     public static void main(String[] args) }{{@code
 *         Pulumi.run(App::stack);
 *     }}{@code
 * 
 *     public static void stack(Context ctx) }{{@code
 *         var scheduledAction = new ScheduledAction("scheduledAction", ScheduledActionArgs.builder()
 *             .displayName("Monthly Cost By Resource")
 *             .kind("Email")
 *             .name("monthlyCostByResource")
 *             .notification(NotificationPropertiesArgs.builder()
 *                 .subject("Cost by resource this month")
 *                 .to(                
 *                     "user}{@literal @}{@code gmail.com",
 *                     "team}{@literal @}{@code gmail.com")
 *                 .build())
 *             .schedule(SchedulePropertiesArgs.builder()
 *                 .daysOfWeek("Monday")
 *                 .endDate("2021-06-19T22:21:51.1287144Z")
 *                 .frequency("Monthly")
 *                 .hourOfDay(10)
 *                 .startDate("2020-06-19T22:21:51.1287144Z")
 *                 .weeksOfMonth(                
 *                     "First",
 *                     "Third")
 *                 .build())
 *             .status("Enabled")
 *             .viewId("/providers/Microsoft.CostManagement/views/swaggerExample")
 *             .build());
 * 
 *     }}{@code
 * }}{@code
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:costmanagement:ScheduledAction monthlyCostByResource /providers/Microsoft.CostManagement/scheduledActions/{name} * ``` * */ @ResourceType(type="azure-native:costmanagement:ScheduledAction") public class ScheduledAction extends com.pulumi.resources.CustomResource { /** * Scheduled action name. * */ @Export(name="displayName", refs={String.class}, tree="[0]") private Output displayName; /** * @return Scheduled action name. * */ public Output displayName() { return this.displayName; } /** * Resource Etag. For update calls, eTag is optional and can be specified to achieve optimistic concurrency. Fetch the resource's eTag by doing a 'GET' call first and then including the latest eTag as part of the request body or 'If-Match' header while performing the update. For create calls, eTag is not required. * */ @Export(name="eTag", refs={String.class}, tree="[0]") private Output eTag; /** * @return Resource Etag. For update calls, eTag is optional and can be specified to achieve optimistic concurrency. Fetch the resource's eTag by doing a 'GET' call first and then including the latest eTag as part of the request body or 'If-Match' header while performing the update. For create calls, eTag is not required. * */ public Output eTag() { return this.eTag; } /** * Destination format of the view data. This is optional. * */ @Export(name="fileDestination", refs={FileDestinationResponse.class}, tree="[0]") private Output fileDestination; /** * @return Destination format of the view data. This is optional. * */ public Output> fileDestination() { return Codegen.optional(this.fileDestination); } /** * Kind of the scheduled action. * */ @Export(name="kind", refs={String.class}, tree="[0]") private Output kind; /** * @return Kind of the scheduled action. * */ public Output> kind() { return Codegen.optional(this.kind); } /** * The name of the resource * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the resource * */ public Output name() { return this.name; } /** * Notification properties based on scheduled action kind. * */ @Export(name="notification", refs={NotificationPropertiesResponse.class}, tree="[0]") private Output notification; /** * @return Notification properties based on scheduled action kind. * */ public Output notification() { return this.notification; } /** * Email address of the point of contact that should get the unsubscribe requests and notification emails. * */ @Export(name="notificationEmail", refs={String.class}, tree="[0]") private Output notificationEmail; /** * @return Email address of the point of contact that should get the unsubscribe requests and notification emails. * */ public Output> notificationEmail() { return Codegen.optional(this.notificationEmail); } /** * Schedule of the scheduled action. * */ @Export(name="schedule", refs={SchedulePropertiesResponse.class}, tree="[0]") private Output schedule; /** * @return Schedule of the scheduled action. * */ public Output schedule() { return this.schedule; } /** * For private scheduled action(Create or Update), scope will be empty.<br /> For shared scheduled action(Create or Update By Scope), Cost Management scope can be 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope. * */ @Export(name="scope", refs={String.class}, tree="[0]") private Output scope; /** * @return For private scheduled action(Create or Update), scope will be empty.<br /> For shared scheduled action(Create or Update By Scope), Cost Management scope can be 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope. * */ public Output> scope() { return Codegen.optional(this.scope); } /** * Status of the scheduled action. * */ @Export(name="status", refs={String.class}, tree="[0]") private Output status; /** * @return Status of the scheduled action. * */ public Output status() { return this.status; } /** * Kind of the scheduled action. * */ @Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]") private Output systemData; /** * @return Kind of the scheduled action. * */ public Output systemData() { return this.systemData; } /** * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * */ public Output type() { return this.type; } /** * Cost analysis viewId used for scheduled action. For example, '/providers/Microsoft.CostManagement/views/swaggerExample' * */ @Export(name="viewId", refs={String.class}, tree="[0]") private Output viewId; /** * @return Cost analysis viewId used for scheduled action. For example, '/providers/Microsoft.CostManagement/views/swaggerExample' * */ public Output viewId() { return this.viewId; } /** * * @param name The _unique_ name of the resulting resource. */ public ScheduledAction(java.lang.String name) { this(name, ScheduledActionArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ScheduledAction(java.lang.String name, ScheduledActionArgs 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 ScheduledAction(java.lang.String name, ScheduledActionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:costmanagement:ScheduledAction", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ScheduledAction(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:costmanagement:ScheduledAction", name, null, makeResourceOptions(options, id), false); } private static ScheduledActionArgs makeArgs(ScheduledActionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ScheduledActionArgs.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:costmanagement/v20220401preview:ScheduledAction").build()), Output.of(Alias.builder().type("azure-native:costmanagement/v20220601preview:ScheduledAction").build()), Output.of(Alias.builder().type("azure-native:costmanagement/v20221001:ScheduledAction").build()), Output.of(Alias.builder().type("azure-native:costmanagement/v20230301:ScheduledAction").build()), Output.of(Alias.builder().type("azure-native:costmanagement/v20230401preview:ScheduledAction").build()), Output.of(Alias.builder().type("azure-native:costmanagement/v20230701preview:ScheduledAction").build()), Output.of(Alias.builder().type("azure-native:costmanagement/v20230801:ScheduledAction").build()), Output.of(Alias.builder().type("azure-native:costmanagement/v20230901:ScheduledAction").build()), Output.of(Alias.builder().type("azure-native:costmanagement/v20231101:ScheduledAction").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 ScheduledAction get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ScheduledAction(name, id, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy