Oracle Cloud Infrastructure

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

getAnnouncementSubscriptions

This data source provides the list of Announcement Subscriptions in Oracle Cloud Infrastructure Announcements Service service.

Gets a list of all announcement subscriptions in the specified compartment.

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 testAnnouncementSubscriptions = Oci.AnnouncementsService.GetAnnouncementSubscriptions.Invoke(new()
    {
        CompartmentId = @var.Compartment_id,
        DisplayName = @var.Announcement_subscription_display_name,
        Id = @var.Announcement_subscription_id,
        State = @var.Announcement_subscription_state,
    });

});
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.GetAnnouncementSubscriptions(ctx, &announcementsservice.GetAnnouncementSubscriptionsArgs{
			CompartmentId: _var.Compartment_id,
			DisplayName:   pulumi.StringRef(_var.Announcement_subscription_display_name),
			Id:            pulumi.StringRef(_var.Announcement_subscription_id),
			State:         pulumi.StringRef(_var.Announcement_subscription_state),
		}, nil)
		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.AnnouncementsServiceFunctions;
import com.pulumi.oci.AnnouncementsService.inputs.GetAnnouncementSubscriptionsArgs;
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) {
        final var testAnnouncementSubscriptions = AnnouncementsServiceFunctions.getAnnouncementSubscriptions(GetAnnouncementSubscriptionsArgs.builder()
            .compartmentId(var_.compartment_id())
            .displayName(var_.announcement_subscription_display_name())
            .id(var_.announcement_subscription_id())
            .state(var_.announcement_subscription_state())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_announcement_subscriptions = oci.AnnouncementsService.get_announcement_subscriptions(compartment_id=var["compartment_id"],
    display_name=var["announcement_subscription_display_name"],
    id=var["announcement_subscription_id"],
    state=var["announcement_subscription_state"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testAnnouncementSubscriptions = oci.AnnouncementsService.getAnnouncementSubscriptions({
    compartmentId: _var.compartment_id,
    displayName: _var.announcement_subscription_display_name,
    id: _var.announcement_subscription_id,
    state: _var.announcement_subscription_state,
});
variables:
  testAnnouncementSubscriptions:
    Fn::Invoke:
      Function: oci:AnnouncementsService:getAnnouncementSubscriptions
      Arguments:
        compartmentId: ${var.compartment_id}
        displayName: ${var.announcement_subscription_display_name}
        id: ${var.announcement_subscription_id}
        state: ${var.announcement_subscription_state}

Using getAnnouncementSubscriptions

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getAnnouncementSubscriptions(args: GetAnnouncementSubscriptionsArgs, opts?: InvokeOptions): Promise<GetAnnouncementSubscriptionsResult>
function getAnnouncementSubscriptionsOutput(args: GetAnnouncementSubscriptionsOutputArgs, opts?: InvokeOptions): Output<GetAnnouncementSubscriptionsResult>
def get_announcement_subscriptions(compartment_id: Optional[str] = None,
                                   display_name: Optional[str] = None,
                                   filters: Optional[Sequence[_announcementsservice.GetAnnouncementSubscriptionsFilter]] = None,
                                   id: Optional[str] = None,
                                   state: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetAnnouncementSubscriptionsResult
def get_announcement_subscriptions_output(compartment_id: Optional[pulumi.Input[str]] = None,
                                   display_name: Optional[pulumi.Input[str]] = None,
                                   filters: Optional[pulumi.Input[Sequence[pulumi.Input[_announcementsservice.GetAnnouncementSubscriptionsFilterArgs]]]] = None,
                                   id: Optional[pulumi.Input[str]] = None,
                                   state: Optional[pulumi.Input[str]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetAnnouncementSubscriptionsResult]
func GetAnnouncementSubscriptions(ctx *Context, args *GetAnnouncementSubscriptionsArgs, opts ...InvokeOption) (*GetAnnouncementSubscriptionsResult, error)
func GetAnnouncementSubscriptionsOutput(ctx *Context, args *GetAnnouncementSubscriptionsOutputArgs, opts ...InvokeOption) GetAnnouncementSubscriptionsResultOutput

> Note: This function is named GetAnnouncementSubscriptions in the Go SDK.

public static class GetAnnouncementSubscriptions 
{
    public static Task<GetAnnouncementSubscriptionsResult> InvokeAsync(GetAnnouncementSubscriptionsArgs args, InvokeOptions? opts = null)
    public static Output<GetAnnouncementSubscriptionsResult> Invoke(GetAnnouncementSubscriptionsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAnnouncementSubscriptionsResult> getAnnouncementSubscriptions(GetAnnouncementSubscriptionsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: oci:AnnouncementsService/getAnnouncementSubscriptions:getAnnouncementSubscriptions
  arguments:
    # arguments dictionary

The following arguments are supported:

CompartmentId string

The OCID of the compartment.

DisplayName string

A filter to return only resources that match the entire display name given.

Filters List<GetAnnouncementSubscriptionsFilter>
Id string

The OCID of the announcement subscription.

State string

A filter to return only announcement subscriptions that match the given lifecycle state.

CompartmentId string

The OCID of the compartment.

DisplayName string

A filter to return only resources that match the entire display name given.

Filters []GetAnnouncementSubscriptionsFilter
Id string

The OCID of the announcement subscription.

State string

A filter to return only announcement subscriptions that match the given lifecycle state.

compartmentId String

The OCID of the compartment.

displayName String

A filter to return only resources that match the entire display name given.

filters List<GetAnnouncementSubscriptionsFilter>
id String

The OCID of the announcement subscription.

state String

A filter to return only announcement subscriptions that match the given lifecycle state.

compartmentId string

The OCID of the compartment.

displayName string

A filter to return only resources that match the entire display name given.

filters GetAnnouncementSubscriptionsFilter[]
id string

The OCID of the announcement subscription.

state string

A filter to return only announcement subscriptions that match the given lifecycle state.

compartment_id str

The OCID of the compartment.

display_name str

A filter to return only resources that match the entire display name given.

filters GetAnnouncementSubscriptionsFilter]
id str

The OCID of the announcement subscription.

state str

A filter to return only announcement subscriptions that match the given lifecycle state.

compartmentId String

The OCID of the compartment.

displayName String

A filter to return only resources that match the entire display name given.

filters List<Property Map>
id String

The OCID of the announcement subscription.

state String

A filter to return only announcement subscriptions that match the given lifecycle state.

getAnnouncementSubscriptions Result

The following output properties are available:

AnnouncementSubscriptionCollections List<GetAnnouncementSubscriptionsAnnouncementSubscriptionCollection>

The list of announcement_subscription_collection.

CompartmentId string

The OCID of the compartment that contains the announcement subscription.

DisplayName string

A user-friendly name for the announcement subscription. Does not have to be unique, and it's changeable. Avoid entering confidential information.

Filters List<GetAnnouncementSubscriptionsFilter>
Id string

The OCID of the announcement subscription.

State string

The current lifecycle state of the announcement subscription.

AnnouncementSubscriptionCollections []GetAnnouncementSubscriptionsAnnouncementSubscriptionCollection

The list of announcement_subscription_collection.

CompartmentId string

The OCID of the compartment that contains the announcement subscription.

DisplayName string

A user-friendly name for the announcement subscription. Does not have to be unique, and it's changeable. Avoid entering confidential information.

Filters []GetAnnouncementSubscriptionsFilter
Id string

The OCID of the announcement subscription.

State string

The current lifecycle state of the announcement subscription.

announcementSubscriptionCollections List<GetAnnouncementSubscriptionsAnnouncementSubscriptionCollection>

The list of announcement_subscription_collection.

compartmentId String

The OCID of the compartment that contains the announcement subscription.

displayName String

A user-friendly name for the announcement subscription. Does not have to be unique, and it's changeable. Avoid entering confidential information.

filters List<GetAnnouncementSubscriptionsFilter>
id String

The OCID of the announcement subscription.

state String

The current lifecycle state of the announcement subscription.

announcementSubscriptionCollections GetAnnouncementSubscriptionsAnnouncementSubscriptionCollection[]

The list of announcement_subscription_collection.

compartmentId string

The OCID of the compartment that contains the announcement subscription.

displayName string

A user-friendly name for the announcement subscription. Does not have to be unique, and it's changeable. Avoid entering confidential information.

filters GetAnnouncementSubscriptionsFilter[]
id string

The OCID of the announcement subscription.

state string

The current lifecycle state of the announcement subscription.

announcement_subscription_collections GetAnnouncementSubscriptionsAnnouncementSubscriptionCollection]

The list of announcement_subscription_collection.

compartment_id str

The OCID of the compartment that contains the announcement subscription.

display_name str

A user-friendly name for the announcement subscription. Does not have to be unique, and it's changeable. Avoid entering confidential information.

filters GetAnnouncementSubscriptionsFilter]
id str

The OCID of the announcement subscription.

state str

The current lifecycle state of the announcement subscription.

announcementSubscriptionCollections List<Property Map>

The list of announcement_subscription_collection.

compartmentId String

The OCID of the compartment that contains the announcement subscription.

displayName String

A user-friendly name for the announcement subscription. Does not have to be unique, and it's changeable. Avoid entering confidential information.

filters List<Property Map>
id String

The OCID of the announcement subscription.

state String

The current lifecycle state of the announcement subscription.

Supporting Types

GetAnnouncementSubscriptionsAnnouncementSubscriptionCollection

GetAnnouncementSubscriptionsAnnouncementSubscriptionCollectionItem

CompartmentId string

The OCID of the compartment.

DefinedTags Dictionary<string, object>

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

Description string

A description of the announcement subscription. Avoid entering confidential information.

DisplayName string

A filter to return only resources that match the entire display name given.

FilterGroups List<GetAnnouncementSubscriptionsAnnouncementSubscriptionCollectionItemFilterGroup>

A list of filter groups for the announcement subscription. A filter group is a combination of multiple filters applied to announcements for matching purposes.

FreeformTags Dictionary<string, object>

Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

Id string

The OCID of the announcement subscription.

LifecycleDetails string

A message describing the current lifecycle state in more detail. For example, details might provide required or recommended actions for a resource in a Failed state.

OnsTopicId string

The OCID of the Notifications service topic that is the target for publishing announcements that match the configured announcement subscription.

State string

A filter to return only announcement subscriptions that match the given lifecycle state.

SystemTags Dictionary<string, object>

Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

TimeCreated string

The date and time that the announcement subscription was created, expressed in RFC 3339 timestamp format.

TimeUpdated string

The date and time that the announcement subscription was updated, expressed in RFC 3339 timestamp format.

CompartmentId string

The OCID of the compartment.

DefinedTags map[string]interface{}

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

Description string

A description of the announcement subscription. Avoid entering confidential information.

DisplayName string

A filter to return only resources that match the entire display name given.

FilterGroups []GetAnnouncementSubscriptionsAnnouncementSubscriptionCollectionItemFilterGroup

A list of filter groups for the announcement subscription. A filter group is a combination of multiple filters applied to announcements for matching purposes.

FreeformTags map[string]interface{}

Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

Id string

The OCID of the announcement subscription.

LifecycleDetails string

A message describing the current lifecycle state in more detail. For example, details might provide required or recommended actions for a resource in a Failed state.

OnsTopicId string

The OCID of the Notifications service topic that is the target for publishing announcements that match the configured announcement subscription.

State string

A filter to return only announcement subscriptions that match the given lifecycle state.

SystemTags map[string]interface{}

Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

TimeCreated string

The date and time that the announcement subscription was created, expressed in RFC 3339 timestamp format.

TimeUpdated string

The date and time that the announcement subscription was updated, expressed in RFC 3339 timestamp format.

compartmentId String

The OCID of the compartment.

definedTags Map<String,Object>

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

description String

A description of the announcement subscription. Avoid entering confidential information.

displayName String

A filter to return only resources that match the entire display name given.

filterGroups List<GetAnnouncementSubscriptionsAnnouncementSubscriptionCollectionItemFilterGroup>

A list of filter groups for the announcement subscription. A filter group is a combination of multiple filters applied to announcements for matching purposes.

freeformTags Map<String,Object>

Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

id String

The OCID of the announcement subscription.

lifecycleDetails String

A message describing the current lifecycle state in more detail. For example, details might provide required or recommended actions for a resource in a Failed state.

onsTopicId String

The OCID of the Notifications service topic that is the target for publishing announcements that match the configured announcement subscription.

state String

A filter to return only announcement subscriptions that match the given lifecycle state.

systemTags Map<String,Object>

Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

timeCreated String

The date and time that the announcement subscription was created, expressed in RFC 3339 timestamp format.

timeUpdated String

The date and time that the announcement subscription was updated, expressed in RFC 3339 timestamp format.

compartmentId string

The OCID of the compartment.

definedTags {[key: string]: any}

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

description string

A description of the announcement subscription. Avoid entering confidential information.

displayName string

A filter to return only resources that match the entire display name given.

filterGroups GetAnnouncementSubscriptionsAnnouncementSubscriptionCollectionItemFilterGroup[]

A list of filter groups for the announcement subscription. A filter group is a combination of multiple filters applied to announcements for matching purposes.

freeformTags {[key: string]: any}

Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

id string

The OCID of the announcement subscription.

lifecycleDetails string

A message describing the current lifecycle state in more detail. For example, details might provide required or recommended actions for a resource in a Failed state.

onsTopicId string

The OCID of the Notifications service topic that is the target for publishing announcements that match the configured announcement subscription.

state string

A filter to return only announcement subscriptions that match the given lifecycle state.

systemTags {[key: string]: any}

Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

timeCreated string

The date and time that the announcement subscription was created, expressed in RFC 3339 timestamp format.

timeUpdated string

The date and time that the announcement subscription was updated, expressed in RFC 3339 timestamp format.

compartment_id str

The OCID of the compartment.

defined_tags Mapping[str, Any]

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

description str

A description of the announcement subscription. Avoid entering confidential information.

display_name str

A filter to return only resources that match the entire display name given.

filter_groups GetAnnouncementSubscriptionsAnnouncementSubscriptionCollectionItemFilterGroup]

A list of filter groups for the announcement subscription. A filter group is a combination of multiple filters applied to announcements for matching purposes.

freeform_tags Mapping[str, Any]

Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

id str

The OCID of the announcement subscription.

lifecycle_details str

A message describing the current lifecycle state in more detail. For example, details might provide required or recommended actions for a resource in a Failed state.

ons_topic_id str

The OCID of the Notifications service topic that is the target for publishing announcements that match the configured announcement subscription.

state str

A filter to return only announcement subscriptions that match the given lifecycle state.

system_tags Mapping[str, Any]

Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

time_created str

The date and time that the announcement subscription was created, expressed in RFC 3339 timestamp format.

time_updated str

The date and time that the announcement subscription was updated, expressed in RFC 3339 timestamp format.

compartmentId String

The OCID of the compartment.

definedTags Map<Any>

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

description String

A description of the announcement subscription. Avoid entering confidential information.

displayName String

A filter to return only resources that match the entire display name given.

filterGroups List<Property Map>

A list of filter groups for the announcement subscription. A filter group is a combination of multiple filters applied to announcements for matching purposes.

freeformTags Map<Any>

Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

id String

The OCID of the announcement subscription.

lifecycleDetails String

A message describing the current lifecycle state in more detail. For example, details might provide required or recommended actions for a resource in a Failed state.

onsTopicId String

The OCID of the Notifications service topic that is the target for publishing announcements that match the configured announcement subscription.

state String

A filter to return only announcement subscriptions that match the given lifecycle state.

systemTags Map<Any>

Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

timeCreated String

The date and time that the announcement subscription was created, expressed in RFC 3339 timestamp format.

timeUpdated String

The date and time that the announcement subscription was updated, expressed in RFC 3339 timestamp format.

GetAnnouncementSubscriptionsAnnouncementSubscriptionCollectionItemFilterGroup

Filters List<GetAnnouncementSubscriptionsAnnouncementSubscriptionCollectionItemFilterGroupFilter>

A list of filters against which the Announcements service matches announcements. You cannot have more than one of any given filter type within a filter group. You also cannot combine the RESOURCE_ID filter with any other type of filter within a given filter group.

Name string

The name of the group. The name must be unique and it cannot be changed. Avoid entering confidential information.

Filters []GetAnnouncementSubscriptionsAnnouncementSubscriptionCollectionItemFilterGroupFilter

A list of filters against which the Announcements service matches announcements. You cannot have more than one of any given filter type within a filter group. You also cannot combine the RESOURCE_ID filter with any other type of filter within a given filter group.

Name string

The name of the group. The name must be unique and it cannot be changed. Avoid entering confidential information.

filters List<GetAnnouncementSubscriptionsAnnouncementSubscriptionCollectionItemFilterGroupFilter>

A list of filters against which the Announcements service matches announcements. You cannot have more than one of any given filter type within a filter group. You also cannot combine the RESOURCE_ID filter with any other type of filter within a given filter group.

name String

The name of the group. The name must be unique and it cannot be changed. Avoid entering confidential information.

filters GetAnnouncementSubscriptionsAnnouncementSubscriptionCollectionItemFilterGroupFilter[]

A list of filters against which the Announcements service matches announcements. You cannot have more than one of any given filter type within a filter group. You also cannot combine the RESOURCE_ID filter with any other type of filter within a given filter group.

name string

The name of the group. The name must be unique and it cannot be changed. Avoid entering confidential information.

filters GetAnnouncementSubscriptionsAnnouncementSubscriptionCollectionItemFilterGroupFilter]

A list of filters against which the Announcements service matches announcements. You cannot have more than one of any given filter type within a filter group. You also cannot combine the RESOURCE_ID filter with any other type of filter within a given filter group.

name str

The name of the group. The name must be unique and it cannot be changed. Avoid entering confidential information.

filters List<Property Map>

A list of filters against which the Announcements service matches announcements. You cannot have more than one of any given filter type within a filter group. You also cannot combine the RESOURCE_ID filter with any other type of filter within a given filter group.

name String

The name of the group. The name must be unique and it cannot be changed. Avoid entering confidential information.

GetAnnouncementSubscriptionsAnnouncementSubscriptionCollectionItemFilterGroupFilter

Type string

The type of filter.

Value string

The value of the filter.

Type string

The type of filter.

Value string

The value of the filter.

type String

The type of filter.

value String

The value of the filter.

type string

The type of filter.

value string

The value of the filter.

type str

The type of filter.

value str

The value of the filter.

type String

The type of filter.

value String

The value of the filter.

GetAnnouncementSubscriptionsFilter

Name string

The name of the group. The name must be unique and it cannot be changed. Avoid entering confidential information.

Values List<string>
Regex bool
Name string

The name of the group. The name must be unique and it cannot be changed. Avoid entering confidential information.

Values []string
Regex bool
name String

The name of the group. The name must be unique and it cannot be changed. Avoid entering confidential information.

values List<String>
regex Boolean
name string

The name of the group. The name must be unique and it cannot be changed. Avoid entering confidential information.

values string[]
regex boolean
name str

The name of the group. The name must be unique and it cannot be changed. Avoid entering confidential information.

values Sequence[str]
regex bool
name String

The name of the group. The name must be unique and it cannot be changed. Avoid entering confidential information.

values List<String>
regex Boolean

Package Details

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

This Pulumi package is based on the oci Terraform Provider.