Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi
oci.Optimizer.getResourceAction
Explore with Pulumi AI
This data source provides details about a specific Resource Action resource in Oracle Cloud Infrastructure Optimizer service.
Gets the resource action that corresponds to the specified OCID.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testResourceAction = oci.Optimizer.getResourceAction({
resourceActionId: testResourceActionOciOptimizerResourceAction.id,
includeResourceMetadata: resourceActionIncludeResourceMetadata,
});
import pulumi
import pulumi_oci as oci
test_resource_action = oci.Optimizer.get_resource_action(resource_action_id=test_resource_action_oci_optimizer_resource_action["id"],
include_resource_metadata=resource_action_include_resource_metadata)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Optimizer"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Optimizer.GetResourceAction(ctx, &optimizer.GetResourceActionArgs{
ResourceActionId: testResourceActionOciOptimizerResourceAction.Id,
IncludeResourceMetadata: pulumi.BoolRef(resourceActionIncludeResourceMetadata),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testResourceAction = Oci.Optimizer.GetResourceAction.Invoke(new()
{
ResourceActionId = testResourceActionOciOptimizerResourceAction.Id,
IncludeResourceMetadata = resourceActionIncludeResourceMetadata,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Optimizer.OptimizerFunctions;
import com.pulumi.oci.Optimizer.inputs.GetResourceActionArgs;
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 testResourceAction = OptimizerFunctions.getResourceAction(GetResourceActionArgs.builder()
.resourceActionId(testResourceActionOciOptimizerResourceAction.id())
.includeResourceMetadata(resourceActionIncludeResourceMetadata)
.build());
}
}
variables:
testResourceAction:
fn::invoke:
Function: oci:Optimizer:getResourceAction
Arguments:
resourceActionId: ${testResourceActionOciOptimizerResourceAction.id}
includeResourceMetadata: ${resourceActionIncludeResourceMetadata}
Using getResourceAction
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 getResourceAction(args: GetResourceActionArgs, opts?: InvokeOptions): Promise<GetResourceActionResult>
function getResourceActionOutput(args: GetResourceActionOutputArgs, opts?: InvokeOptions): Output<GetResourceActionResult>
def get_resource_action(include_resource_metadata: Optional[bool] = None,
resource_action_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetResourceActionResult
def get_resource_action_output(include_resource_metadata: Optional[pulumi.Input[bool]] = None,
resource_action_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetResourceActionResult]
func GetResourceAction(ctx *Context, args *GetResourceActionArgs, opts ...InvokeOption) (*GetResourceActionResult, error)
func GetResourceActionOutput(ctx *Context, args *GetResourceActionOutputArgs, opts ...InvokeOption) GetResourceActionResultOutput
> Note: This function is named GetResourceAction
in the Go SDK.
public static class GetResourceAction
{
public static Task<GetResourceActionResult> InvokeAsync(GetResourceActionArgs args, InvokeOptions? opts = null)
public static Output<GetResourceActionResult> Invoke(GetResourceActionInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetResourceActionResult> getResourceAction(GetResourceActionArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Optimizer/getResourceAction:getResourceAction
arguments:
# arguments dictionary
The following arguments are supported:
- Resource
Action stringId - The unique OCID associated with the resource action.
- Include
Resource boolMetadata - Supplement additional resource information in extended metadata response.
- Resource
Action stringId - The unique OCID associated with the resource action.
- Include
Resource boolMetadata - Supplement additional resource information in extended metadata response.
- resource
Action StringId - The unique OCID associated with the resource action.
- include
Resource BooleanMetadata - Supplement additional resource information in extended metadata response.
- resource
Action stringId - The unique OCID associated with the resource action.
- include
Resource booleanMetadata - Supplement additional resource information in extended metadata response.
- resource_
action_ strid - The unique OCID associated with the resource action.
- include_
resource_ boolmetadata - Supplement additional resource information in extended metadata response.
- resource
Action StringId - The unique OCID associated with the resource action.
- include
Resource BooleanMetadata - Supplement additional resource information in extended metadata response.
getResourceAction Result
The following output properties are available:
- Actions
List<Get
Resource Action Action> - Details about the recommended action.
- Category
Id string - The unique OCID associated with the category.
- Compartment
Id string - The OCID of the compartment.
- Compartment
Name string - The name associated with the compartment.
- Estimated
Cost doubleSaving - The estimated cost savings, in dollars, for the resource action.
- Extended
Metadata Dictionary<string, string> - Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the
metadata
object. - Id string
- The unique OCID associated with the resource action.
- Metadata Dictionary<string, string>
- Custom metadata key/value pairs for the resource action.
- Name string
- The name assigned to the resource.
- Recommendation
Id string - The unique OCID associated with the recommendation.
- Resource
Action stringId - Resource
Id string - The unique OCID associated with the resource.
- Resource
Type string - The kind of resource.
- State string
- The resource action's current state.
- Status string
- The current status of the resource action.
- Time
Created string - The date and time the resource action details were created, in the format defined by RFC3339.
- Time
Status stringBegin - The date and time that the resource action entered its current status. The format is defined by RFC3339.
- Time
Status stringEnd - The date and time the current status will change. The format is defined by RFC3339.
- Time
Updated string - The date and time the resource action details were last updated, in the format defined by RFC3339.
- Include
Resource boolMetadata
- Actions
[]Get
Resource Action Action - Details about the recommended action.
- Category
Id string - The unique OCID associated with the category.
- Compartment
Id string - The OCID of the compartment.
- Compartment
Name string - The name associated with the compartment.
- Estimated
Cost float64Saving - The estimated cost savings, in dollars, for the resource action.
- Extended
Metadata map[string]string - Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the
metadata
object. - Id string
- The unique OCID associated with the resource action.
- Metadata map[string]string
- Custom metadata key/value pairs for the resource action.
- Name string
- The name assigned to the resource.
- Recommendation
Id string - The unique OCID associated with the recommendation.
- Resource
Action stringId - Resource
Id string - The unique OCID associated with the resource.
- Resource
Type string - The kind of resource.
- State string
- The resource action's current state.
- Status string
- The current status of the resource action.
- Time
Created string - The date and time the resource action details were created, in the format defined by RFC3339.
- Time
Status stringBegin - The date and time that the resource action entered its current status. The format is defined by RFC3339.
- Time
Status stringEnd - The date and time the current status will change. The format is defined by RFC3339.
- Time
Updated string - The date and time the resource action details were last updated, in the format defined by RFC3339.
- Include
Resource boolMetadata
- actions
List<Get
Resource Action Action> - Details about the recommended action.
- category
Id String - The unique OCID associated with the category.
- compartment
Id String - The OCID of the compartment.
- compartment
Name String - The name associated with the compartment.
- estimated
Cost DoubleSaving - The estimated cost savings, in dollars, for the resource action.
- extended
Metadata Map<String,String> - Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the
metadata
object. - id String
- The unique OCID associated with the resource action.
- metadata Map<String,String>
- Custom metadata key/value pairs for the resource action.
- name String
- The name assigned to the resource.
- recommendation
Id String - The unique OCID associated with the recommendation.
- resource
Action StringId - resource
Id String - The unique OCID associated with the resource.
- resource
Type String - The kind of resource.
- state String
- The resource action's current state.
- status String
- The current status of the resource action.
- time
Created String - The date and time the resource action details were created, in the format defined by RFC3339.
- time
Status StringBegin - The date and time that the resource action entered its current status. The format is defined by RFC3339.
- time
Status StringEnd - The date and time the current status will change. The format is defined by RFC3339.
- time
Updated String - The date and time the resource action details were last updated, in the format defined by RFC3339.
- include
Resource BooleanMetadata
- actions
Get
Resource Action Action[] - Details about the recommended action.
- category
Id string - The unique OCID associated with the category.
- compartment
Id string - The OCID of the compartment.
- compartment
Name string - The name associated with the compartment.
- estimated
Cost numberSaving - The estimated cost savings, in dollars, for the resource action.
- extended
Metadata {[key: string]: string} - Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the
metadata
object. - id string
- The unique OCID associated with the resource action.
- metadata {[key: string]: string}
- Custom metadata key/value pairs for the resource action.
- name string
- The name assigned to the resource.
- recommendation
Id string - The unique OCID associated with the recommendation.
- resource
Action stringId - resource
Id string - The unique OCID associated with the resource.
- resource
Type string - The kind of resource.
- state string
- The resource action's current state.
- status string
- The current status of the resource action.
- time
Created string - The date and time the resource action details were created, in the format defined by RFC3339.
- time
Status stringBegin - The date and time that the resource action entered its current status. The format is defined by RFC3339.
- time
Status stringEnd - The date and time the current status will change. The format is defined by RFC3339.
- time
Updated string - The date and time the resource action details were last updated, in the format defined by RFC3339.
- include
Resource booleanMetadata
- actions
Sequence[optimizer.
Get Resource Action Action] - Details about the recommended action.
- category_
id str - The unique OCID associated with the category.
- compartment_
id str - The OCID of the compartment.
- compartment_
name str - The name associated with the compartment.
- estimated_
cost_ floatsaving - The estimated cost savings, in dollars, for the resource action.
- extended_
metadata Mapping[str, str] - Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the
metadata
object. - id str
- The unique OCID associated with the resource action.
- metadata Mapping[str, str]
- Custom metadata key/value pairs for the resource action.
- name str
- The name assigned to the resource.
- recommendation_
id str - The unique OCID associated with the recommendation.
- resource_
action_ strid - resource_
id str - The unique OCID associated with the resource.
- resource_
type str - The kind of resource.
- state str
- The resource action's current state.
- status str
- The current status of the resource action.
- time_
created str - The date and time the resource action details were created, in the format defined by RFC3339.
- time_
status_ strbegin - The date and time that the resource action entered its current status. The format is defined by RFC3339.
- time_
status_ strend - The date and time the current status will change. The format is defined by RFC3339.
- time_
updated str - The date and time the resource action details were last updated, in the format defined by RFC3339.
- include_
resource_ boolmetadata
- actions List<Property Map>
- Details about the recommended action.
- category
Id String - The unique OCID associated with the category.
- compartment
Id String - The OCID of the compartment.
- compartment
Name String - The name associated with the compartment.
- estimated
Cost NumberSaving - The estimated cost savings, in dollars, for the resource action.
- extended
Metadata Map<String> - Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the
metadata
object. - id String
- The unique OCID associated with the resource action.
- metadata Map<String>
- Custom metadata key/value pairs for the resource action.
- name String
- The name assigned to the resource.
- recommendation
Id String - The unique OCID associated with the recommendation.
- resource
Action StringId - resource
Id String - The unique OCID associated with the resource.
- resource
Type String - The kind of resource.
- state String
- The resource action's current state.
- status String
- The current status of the resource action.
- time
Created String - The date and time the resource action details were created, in the format defined by RFC3339.
- time
Status StringBegin - The date and time that the resource action entered its current status. The format is defined by RFC3339.
- time
Status StringEnd - The date and time the current status will change. The format is defined by RFC3339.
- time
Updated String - The date and time the resource action details were last updated, in the format defined by RFC3339.
- include
Resource BooleanMetadata
Supporting Types
GetResourceActionAction
- Description string
- Text describing the recommended action.
- Type string
- The status of the resource action.
- Url string
- The URL path to documentation that explains how to perform the action.
- Description string
- Text describing the recommended action.
- Type string
- The status of the resource action.
- Url string
- The URL path to documentation that explains how to perform the action.
- description String
- Text describing the recommended action.
- type String
- The status of the resource action.
- url String
- The URL path to documentation that explains how to perform the action.
- description string
- Text describing the recommended action.
- type string
- The status of the resource action.
- url string
- The URL path to documentation that explains how to perform the action.
- description str
- Text describing the recommended action.
- type str
- The status of the resource action.
- url str
- The URL path to documentation that explains how to perform the action.
- description String
- Text describing the recommended action.
- type String
- The status of the resource action.
- url String
- The URL path to documentation that explains how to perform the action.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.