getServiceUpdateActions function

Future<GetServiceUpdateActionsResult> getServiceUpdateActions(
  1. GetServiceUpdateActionsArgs args, {
  2. InvokeOptions? options,
})

Provides details about an AWS ElastiCache Service Update Actions for a given Cache Cluster or Replication Group.

When creating a new Cache Cluster or Replication Group, it takes approximately 10 minutes for Update Actions to be listed.

Example Usage

Basic Usage

The following example will list all Update Actions for the Cache Cluster with a service update status of available.

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.elasticache.getServiceUpdateActions({
    cacheClusterId: exampleAwsElasticacheCluster.clusterId,
    serviceUpdateStatuses: ["available"],
});
import pulumi
import pulumi_aws as aws

example = aws.elasticache.get_service_update_actions(cache_cluster_id=example_aws_elasticache_cluster["clusterId"],
    service_update_statuses=["available"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = Aws.ElastiCache.GetServiceUpdateActions.Invoke(new()
    {
        CacheClusterId = exampleAwsElasticacheCluster.ClusterId,
        ServiceUpdateStatuses = new[]
        {
            "available",
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/elasticache"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := elasticache.GetServiceUpdateActions(ctx, &elasticache.GetServiceUpdateActionsArgs{
			CacheClusterId: pulumi.StringRef(exampleAwsElasticacheCluster.ClusterId),
			ServiceUpdateStatuses: []string{
				"available",
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

data "aws_elasticache_getserviceupdateactions" "example" {
  cache_cluster_id        = exampleAwsElasticacheCluster.clusterId
  service_update_statuses = ["available"]
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.elasticache.ElasticacheFunctions;
import com.pulumi.aws.elasticache.inputs.GetServiceUpdateActionsArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 example = ElasticacheFunctions.getServiceUpdateActions(GetServiceUpdateActionsArgs.builder()
            .cacheClusterId(exampleAwsElasticacheCluster.clusterId())
            .serviceUpdateStatuses("available")
            .build());

    }
}
variables:
  example:
    fn::invoke:
      function: aws:elasticache:getServiceUpdateActions
      arguments:
        cacheClusterId: ${exampleAwsElasticacheCluster.clusterId}
        serviceUpdateStatuses:
          - available

args Arguments passed to this invoke. Arguments for getServiceUpdateActions. options Invoke options controlling this call.

Implementation

Future<GetServiceUpdateActionsResult> getServiceUpdateActions(
  GetServiceUpdateActionsArgs args, {
  pulumi.InvokeOptions? options,
}) async {
  final deployment = pulumi.Deployment.instance;
  final result = await deployment.invoke<Map<String, dynamic>>(
    'aws:elasticache/getServiceUpdateActions:getServiceUpdateActions',
    args.toMap(),
    options: pulumi.toDeploymentInvokeOptions(options),
  );
  return GetServiceUpdateActionsResult.fromMap(result);
}