Oracle Cloud Infrastructure

v0.5.0 published on Monday, Sep 12, 2022 by Pulumi

AnnouncementSubscriptionsActionsChangeCompartment

This resource provides the Announcement Subscriptions Actions Change Compartment resource in Oracle Cloud Infrastructure Announcements Service service.

Moves the specified announcement subscription from one compartment to another compartment. When provided, If-Match is checked against ETag values of the resource.

This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testAnnouncementSubscriptionsActionsChangeCompartment = new Oci.AnnouncementsService.AnnouncementSubscriptionsActionsChangeCompartment("testAnnouncementSubscriptionsActionsChangeCompartment", new()
    {
        AnnouncementSubscriptionId = oci_announcements_service_announcement_subscription.Test_announcement_subscription.Id,
        CompartmentId = @var.Compartment_id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/go/oci/AnnouncementsService"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := AnnouncementsService.NewAnnouncementSubscriptionsActionsChangeCompartment(ctx, "testAnnouncementSubscriptionsActionsChangeCompartment", &AnnouncementsService.AnnouncementSubscriptionsActionsChangeCompartmentArgs{
			AnnouncementSubscriptionId: pulumi.Any(oci_announcements_service_announcement_subscription.Test_announcement_subscription.Id),
			CompartmentId:              pulumi.Any(_var.Compartment_id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.AnnouncementsService.AnnouncementSubscriptionsActionsChangeCompartment;
import com.pulumi.oci.AnnouncementsService.AnnouncementSubscriptionsActionsChangeCompartmentArgs;
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 testAnnouncementSubscriptionsActionsChangeCompartment = new AnnouncementSubscriptionsActionsChangeCompartment("testAnnouncementSubscriptionsActionsChangeCompartment", AnnouncementSubscriptionsActionsChangeCompartmentArgs.builder()        
            .announcementSubscriptionId(oci_announcements_service_announcement_subscription.test_announcement_subscription().id())
            .compartmentId(var_.compartment_id())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_announcement_subscriptions_actions_change_compartment = oci.announcements_service.AnnouncementSubscriptionsActionsChangeCompartment("testAnnouncementSubscriptionsActionsChangeCompartment",
    announcement_subscription_id=oci_announcements_service_announcement_subscription["test_announcement_subscription"]["id"],
    compartment_id=var["compartment_id"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testAnnouncementSubscriptionsActionsChangeCompartment = new oci.announcementsservice.AnnouncementSubscriptionsActionsChangeCompartment("testAnnouncementSubscriptionsActionsChangeCompartment", {
    announcementSubscriptionId: oci_announcements_service_announcement_subscription.test_announcement_subscription.id,
    compartmentId: _var.compartment_id,
});
resources:
  testAnnouncementSubscriptionsActionsChangeCompartment:
    type: oci:AnnouncementsService:AnnouncementSubscriptionsActionsChangeCompartment
    properties:
      #Required
      announcementSubscriptionId: ${oci_announcements_service_announcement_subscription.test_announcement_subscription.id}
      compartmentId: ${var.compartment_id}

Create AnnouncementSubscriptionsActionsChangeCompartment Resource

new AnnouncementSubscriptionsActionsChangeCompartment(name: string, args: AnnouncementSubscriptionsActionsChangeCompartmentArgs, opts?: CustomResourceOptions);
@overload
def AnnouncementSubscriptionsActionsChangeCompartment(resource_name: str,
                                                      opts: Optional[ResourceOptions] = None,
                                                      announcement_subscription_id: Optional[str] = None,
                                                      compartment_id: Optional[str] = None)
@overload
def AnnouncementSubscriptionsActionsChangeCompartment(resource_name: str,
                                                      args: AnnouncementSubscriptionsActionsChangeCompartmentArgs,
                                                      opts: Optional[ResourceOptions] = None)
func NewAnnouncementSubscriptionsActionsChangeCompartment(ctx *Context, name string, args AnnouncementSubscriptionsActionsChangeCompartmentArgs, opts ...ResourceOption) (*AnnouncementSubscriptionsActionsChangeCompartment, error)
public AnnouncementSubscriptionsActionsChangeCompartment(string name, AnnouncementSubscriptionsActionsChangeCompartmentArgs args, CustomResourceOptions? opts = null)
public AnnouncementSubscriptionsActionsChangeCompartment(String name, AnnouncementSubscriptionsActionsChangeCompartmentArgs args)
public AnnouncementSubscriptionsActionsChangeCompartment(String name, AnnouncementSubscriptionsActionsChangeCompartmentArgs args, CustomResourceOptions options)
type: oci:AnnouncementsService:AnnouncementSubscriptionsActionsChangeCompartment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AnnouncementSubscriptionsActionsChangeCompartmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args AnnouncementSubscriptionsActionsChangeCompartmentArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args AnnouncementSubscriptionsActionsChangeCompartmentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AnnouncementSubscriptionsActionsChangeCompartmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AnnouncementSubscriptionsActionsChangeCompartmentArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

AnnouncementSubscriptionsActionsChangeCompartment Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The AnnouncementSubscriptionsActionsChangeCompartment resource accepts the following input properties:

AnnouncementSubscriptionId string

The OCID of the announcement subscription.

CompartmentId string

The OCID of the compartment into which you want to move the announcement subscription.

AnnouncementSubscriptionId string

The OCID of the announcement subscription.

CompartmentId string

The OCID of the compartment into which you want to move the announcement subscription.

announcementSubscriptionId String

The OCID of the announcement subscription.

compartmentId String

The OCID of the compartment into which you want to move the announcement subscription.

announcementSubscriptionId string

The OCID of the announcement subscription.

compartmentId string

The OCID of the compartment into which you want to move the announcement subscription.

announcement_subscription_id str

The OCID of the announcement subscription.

compartment_id str

The OCID of the compartment into which you want to move the announcement subscription.

announcementSubscriptionId String

The OCID of the announcement subscription.

compartmentId String

The OCID of the compartment into which you want to move the announcement subscription.

Outputs

All input properties are implicitly available as output properties. Additionally, the AnnouncementSubscriptionsActionsChangeCompartment resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing AnnouncementSubscriptionsActionsChangeCompartment Resource

Get an existing AnnouncementSubscriptionsActionsChangeCompartment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: AnnouncementSubscriptionsActionsChangeCompartmentState, opts?: CustomResourceOptions): AnnouncementSubscriptionsActionsChangeCompartment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        announcement_subscription_id: Optional[str] = None,
        compartment_id: Optional[str] = None) -> AnnouncementSubscriptionsActionsChangeCompartment
func GetAnnouncementSubscriptionsActionsChangeCompartment(ctx *Context, name string, id IDInput, state *AnnouncementSubscriptionsActionsChangeCompartmentState, opts ...ResourceOption) (*AnnouncementSubscriptionsActionsChangeCompartment, error)
public static AnnouncementSubscriptionsActionsChangeCompartment Get(string name, Input<string> id, AnnouncementSubscriptionsActionsChangeCompartmentState? state, CustomResourceOptions? opts = null)
public static AnnouncementSubscriptionsActionsChangeCompartment get(String name, Output<String> id, AnnouncementSubscriptionsActionsChangeCompartmentState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AnnouncementSubscriptionId string

The OCID of the announcement subscription.

CompartmentId string

The OCID of the compartment into which you want to move the announcement subscription.

AnnouncementSubscriptionId string

The OCID of the announcement subscription.

CompartmentId string

The OCID of the compartment into which you want to move the announcement subscription.

announcementSubscriptionId String

The OCID of the announcement subscription.

compartmentId String

The OCID of the compartment into which you want to move the announcement subscription.

announcementSubscriptionId string

The OCID of the announcement subscription.

compartmentId string

The OCID of the compartment into which you want to move the announcement subscription.

announcement_subscription_id str

The OCID of the announcement subscription.

compartment_id str

The OCID of the compartment into which you want to move the announcement subscription.

announcementSubscriptionId String

The OCID of the announcement subscription.

compartmentId String

The OCID of the compartment into which you want to move the announcement subscription.

Import

AnnouncementSubscriptionsActionsChangeCompartment can be imported using the id, e.g.

 $ pulumi import oci:AnnouncementsService/announcementSubscriptionsActionsChangeCompartment:AnnouncementSubscriptionsActionsChangeCompartment test_announcement_subscriptions_actions_change_compartment "id"

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.