1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. RmsPolicyAssignmentV1
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

opentelekomcloud.RmsPolicyAssignmentV1

Explore with Pulumi AI

Up-to-date reference of API arguments for RMS Policy Assignment you can get at documentation portal

Using this resource to assign the policy and evaluate OpenTelekomCloud resources.

Example Usage

Assign a custom policy

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

const config = new pulumi.Config();
const policyAssignmentName = config.requireObject("policyAssignmentName");
const functionUrn = config.requireObject("functionUrn");
const functionVersion = config.requireObject("functionVersion");
const rmsAdminTrustAgency = config.requireObject("rmsAdminTrustAgency");
const test = new opentelekomcloud.RmsPolicyAssignmentV1("test", {
    description: "The ECS instances that do not conform to the custom function logic are considered non-compliant.",
    status: "Enabled",
    customPolicy: {
        functionUrn: `${functionUrn}:${functionVersion}`,
        authType: "agency",
        authValue: {
            agency_name: `"${rmsAdminTrustAgency}"`,
        },
    },
    parameters: {
        string_example: "\"string_value\"",
        array_example: "[\"array_element\"]",
        object_example: "{\"terraform_version\":\"1.xx.x\"}",
    },
});
Copy
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud

config = pulumi.Config()
policy_assignment_name = config.require_object("policyAssignmentName")
function_urn = config.require_object("functionUrn")
function_version = config.require_object("functionVersion")
rms_admin_trust_agency = config.require_object("rmsAdminTrustAgency")
test = opentelekomcloud.RmsPolicyAssignmentV1("test",
    description="The ECS instances that do not conform to the custom function logic are considered non-compliant.",
    status="Enabled",
    custom_policy={
        "function_urn": f"{function_urn}:{function_version}",
        "auth_type": "agency",
        "auth_value": {
            "agency_name": f"\"{rms_admin_trust_agency}\"",
        },
    },
    parameters={
        "string_example": "\"string_value\"",
        "array_example": "[\"array_element\"]",
        "object_example": "{\"terraform_version\":\"1.xx.x\"}",
    })
Copy
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		policyAssignmentName := cfg.RequireObject("policyAssignmentName")
		functionUrn := cfg.RequireObject("functionUrn")
		functionVersion := cfg.RequireObject("functionVersion")
		rmsAdminTrustAgency := cfg.RequireObject("rmsAdminTrustAgency")
		_, err := opentelekomcloud.NewRmsPolicyAssignmentV1(ctx, "test", &opentelekomcloud.RmsPolicyAssignmentV1Args{
			Description: pulumi.String("The ECS instances that do not conform to the custom function logic are considered non-compliant."),
			Status:      pulumi.String("Enabled"),
			CustomPolicy: &opentelekomcloud.RmsPolicyAssignmentV1CustomPolicyArgs{
				FunctionUrn: pulumi.Sprintf("%v:%v", functionUrn, functionVersion),
				AuthType:    pulumi.String("agency"),
				AuthValue: pulumi.StringMap{
					"agency_name": pulumi.Sprintf("\"%v\"", rmsAdminTrustAgency),
				},
			},
			Parameters: pulumi.StringMap{
				"string_example": pulumi.String("\"string_value\""),
				"array_example":  pulumi.String("[\"array_element\"]"),
				"object_example": pulumi.String("{\"terraform_version\":\"1.xx.x\"}"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var policyAssignmentName = config.RequireObject<dynamic>("policyAssignmentName");
    var functionUrn = config.RequireObject<dynamic>("functionUrn");
    var functionVersion = config.RequireObject<dynamic>("functionVersion");
    var rmsAdminTrustAgency = config.RequireObject<dynamic>("rmsAdminTrustAgency");
    var test = new Opentelekomcloud.RmsPolicyAssignmentV1("test", new()
    {
        Description = "The ECS instances that do not conform to the custom function logic are considered non-compliant.",
        Status = "Enabled",
        CustomPolicy = new Opentelekomcloud.Inputs.RmsPolicyAssignmentV1CustomPolicyArgs
        {
            FunctionUrn = $"{functionUrn}:{functionVersion}",
            AuthType = "agency",
            AuthValue = 
            {
                { "agency_name", $"\"{rmsAdminTrustAgency}\"" },
            },
        },
        Parameters = 
        {
            { "string_example", "\"string_value\"" },
            { "array_example", "[\"array_element\"]" },
            { "object_example", "{\"terraform_version\":\"1.xx.x\"}" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.RmsPolicyAssignmentV1;
import com.pulumi.opentelekomcloud.RmsPolicyAssignmentV1Args;
import com.pulumi.opentelekomcloud.inputs.RmsPolicyAssignmentV1CustomPolicyArgs;
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 config = ctx.config();
        final var policyAssignmentName = config.get("policyAssignmentName");
        final var functionUrn = config.get("functionUrn");
        final var functionVersion = config.get("functionVersion");
        final var rmsAdminTrustAgency = config.get("rmsAdminTrustAgency");
        var test = new RmsPolicyAssignmentV1("test", RmsPolicyAssignmentV1Args.builder()
            .description("The ECS instances that do not conform to the custom function logic are considered non-compliant.")
            .status("Enabled")
            .customPolicy(RmsPolicyAssignmentV1CustomPolicyArgs.builder()
                .functionUrn(String.format("%s:%s", functionUrn,functionVersion))
                .authType("agency")
                .authValue(Map.of("agency_name", String.format("\"%s\"", rmsAdminTrustAgency)))
                .build())
            .parameters(Map.ofEntries(
                Map.entry("string_example", "\"string_value\""),
                Map.entry("array_example", "[\"array_element\"]"),
                Map.entry("object_example", "{\"terraform_version\":\"1.xx.x\"}")
            ))
            .build());

    }
}
Copy
configuration:
  policyAssignmentName:
    type: dynamic
  functionUrn:
    type: dynamic
  functionVersion:
    type: dynamic
  rmsAdminTrustAgency:
    type: dynamic
resources:
  test:
    type: opentelekomcloud:RmsPolicyAssignmentV1
    properties:
      description: The ECS instances that do not conform to the custom function logic are considered non-compliant.
      status: Enabled
      customPolicy:
        functionUrn: ${functionUrn}:${functionVersion}
        authType: agency
        authValue:
          agency_name: '"${rmsAdminTrustAgency}"'
      parameters:
        string_example: '"string_value"'
        array_example: '["array_element"]'
        object_example: '{"terraform_version":"1.xx.x"}'
Copy

Create RmsPolicyAssignmentV1 Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new RmsPolicyAssignmentV1(name: string, args?: RmsPolicyAssignmentV1Args, opts?: CustomResourceOptions);
@overload
def RmsPolicyAssignmentV1(resource_name: str,
                          args: Optional[RmsPolicyAssignmentV1Args] = None,
                          opts: Optional[ResourceOptions] = None)

@overload
def RmsPolicyAssignmentV1(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          custom_policy: Optional[RmsPolicyAssignmentV1CustomPolicyArgs] = None,
                          description: Optional[str] = None,
                          name: Optional[str] = None,
                          parameters: Optional[Mapping[str, str]] = None,
                          period: Optional[str] = None,
                          policy_definition_id: Optional[str] = None,
                          policy_filter: Optional[RmsPolicyAssignmentV1PolicyFilterArgs] = None,
                          rms_policy_assignment_v1_id: Optional[str] = None,
                          status: Optional[str] = None,
                          timeouts: Optional[RmsPolicyAssignmentV1TimeoutsArgs] = None)
func NewRmsPolicyAssignmentV1(ctx *Context, name string, args *RmsPolicyAssignmentV1Args, opts ...ResourceOption) (*RmsPolicyAssignmentV1, error)
public RmsPolicyAssignmentV1(string name, RmsPolicyAssignmentV1Args? args = null, CustomResourceOptions? opts = null)
public RmsPolicyAssignmentV1(String name, RmsPolicyAssignmentV1Args args)
public RmsPolicyAssignmentV1(String name, RmsPolicyAssignmentV1Args args, CustomResourceOptions options)
type: opentelekomcloud:RmsPolicyAssignmentV1
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

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

Constructor example

The following reference example uses placeholder values for all input properties.

var rmsPolicyAssignmentV1Resource = new Opentelekomcloud.RmsPolicyAssignmentV1("rmsPolicyAssignmentV1Resource", new()
{
    CustomPolicy = new Opentelekomcloud.Inputs.RmsPolicyAssignmentV1CustomPolicyArgs
    {
        AuthType = "string",
        FunctionUrn = "string",
        AuthValue = 
        {
            { "string", "string" },
        },
    },
    Description = "string",
    Name = "string",
    Parameters = 
    {
        { "string", "string" },
    },
    Period = "string",
    PolicyDefinitionId = "string",
    PolicyFilter = new Opentelekomcloud.Inputs.RmsPolicyAssignmentV1PolicyFilterArgs
    {
        Region = "string",
        ResourceId = "string",
        ResourceProvider = "string",
        ResourceType = "string",
        TagKey = "string",
        TagValue = "string",
    },
    RmsPolicyAssignmentV1Id = "string",
    Status = "string",
    Timeouts = new Opentelekomcloud.Inputs.RmsPolicyAssignmentV1TimeoutsArgs
    {
        Create = "string",
        Update = "string",
    },
});
Copy
example, err := opentelekomcloud.NewRmsPolicyAssignmentV1(ctx, "rmsPolicyAssignmentV1Resource", &opentelekomcloud.RmsPolicyAssignmentV1Args{
	CustomPolicy: &opentelekomcloud.RmsPolicyAssignmentV1CustomPolicyArgs{
		AuthType:    pulumi.String("string"),
		FunctionUrn: pulumi.String("string"),
		AuthValue: pulumi.StringMap{
			"string": pulumi.String("string"),
		},
	},
	Description: pulumi.String("string"),
	Name:        pulumi.String("string"),
	Parameters: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Period:             pulumi.String("string"),
	PolicyDefinitionId: pulumi.String("string"),
	PolicyFilter: &opentelekomcloud.RmsPolicyAssignmentV1PolicyFilterArgs{
		Region:           pulumi.String("string"),
		ResourceId:       pulumi.String("string"),
		ResourceProvider: pulumi.String("string"),
		ResourceType:     pulumi.String("string"),
		TagKey:           pulumi.String("string"),
		TagValue:         pulumi.String("string"),
	},
	RmsPolicyAssignmentV1Id: pulumi.String("string"),
	Status:                  pulumi.String("string"),
	Timeouts: &opentelekomcloud.RmsPolicyAssignmentV1TimeoutsArgs{
		Create: pulumi.String("string"),
		Update: pulumi.String("string"),
	},
})
Copy
var rmsPolicyAssignmentV1Resource = new RmsPolicyAssignmentV1("rmsPolicyAssignmentV1Resource", RmsPolicyAssignmentV1Args.builder()
    .customPolicy(RmsPolicyAssignmentV1CustomPolicyArgs.builder()
        .authType("string")
        .functionUrn("string")
        .authValue(Map.of("string", "string"))
        .build())
    .description("string")
    .name("string")
    .parameters(Map.of("string", "string"))
    .period("string")
    .policyDefinitionId("string")
    .policyFilter(RmsPolicyAssignmentV1PolicyFilterArgs.builder()
        .region("string")
        .resourceId("string")
        .resourceProvider("string")
        .resourceType("string")
        .tagKey("string")
        .tagValue("string")
        .build())
    .rmsPolicyAssignmentV1Id("string")
    .status("string")
    .timeouts(RmsPolicyAssignmentV1TimeoutsArgs.builder()
        .create("string")
        .update("string")
        .build())
    .build());
Copy
rms_policy_assignment_v1_resource = opentelekomcloud.RmsPolicyAssignmentV1("rmsPolicyAssignmentV1Resource",
    custom_policy={
        "auth_type": "string",
        "function_urn": "string",
        "auth_value": {
            "string": "string",
        },
    },
    description="string",
    name="string",
    parameters={
        "string": "string",
    },
    period="string",
    policy_definition_id="string",
    policy_filter={
        "region": "string",
        "resource_id": "string",
        "resource_provider": "string",
        "resource_type": "string",
        "tag_key": "string",
        "tag_value": "string",
    },
    rms_policy_assignment_v1_id="string",
    status="string",
    timeouts={
        "create": "string",
        "update": "string",
    })
Copy
const rmsPolicyAssignmentV1Resource = new opentelekomcloud.RmsPolicyAssignmentV1("rmsPolicyAssignmentV1Resource", {
    customPolicy: {
        authType: "string",
        functionUrn: "string",
        authValue: {
            string: "string",
        },
    },
    description: "string",
    name: "string",
    parameters: {
        string: "string",
    },
    period: "string",
    policyDefinitionId: "string",
    policyFilter: {
        region: "string",
        resourceId: "string",
        resourceProvider: "string",
        resourceType: "string",
        tagKey: "string",
        tagValue: "string",
    },
    rmsPolicyAssignmentV1Id: "string",
    status: "string",
    timeouts: {
        create: "string",
        update: "string",
    },
});
Copy
type: opentelekomcloud:RmsPolicyAssignmentV1
properties:
    customPolicy:
        authType: string
        authValue:
            string: string
        functionUrn: string
    description: string
    name: string
    parameters:
        string: string
    period: string
    policyDefinitionId: string
    policyFilter:
        region: string
        resourceId: string
        resourceProvider: string
        resourceType: string
        tagKey: string
        tagValue: string
    rmsPolicyAssignmentV1Id: string
    status: string
    timeouts:
        create: string
        update: string
Copy

RmsPolicyAssignmentV1 Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The RmsPolicyAssignmentV1 resource accepts the following input properties:

CustomPolicy RmsPolicyAssignmentV1CustomPolicy
Specifies the configuration of the custom policy. The object structure is documented below.
Description string
Specifies the description of the policy assignment, which contain maximum of 512 characters.
Name string
Specifies the name of the policy assignment. The valid length is limited from 1 to 64. Change this parameter will create a new resource.
Parameters Dictionary<string, string>
Specifies the rule definition of the policy assignment.
Period string

Specifies the period of the policy assignment. The valid values are as follows:

  • One_Hour
  • Three_Hours
  • Six_Hours
  • Twelve_Hours
  • TwentyFour_Hours

Most one of period and policy_filter can be configured.

PolicyDefinitionId string
Specifies the ID of the built-in policy definition. This parameter and custom_policy are alternative.
PolicyFilter RmsPolicyAssignmentV1PolicyFilter

Specifies the configuration used to filter resources. The object structure is documented below.

If the period is configured, it means that the evaluation is performed periodically. If the policy_filter is configured, it means that the evaluation is performed on the specified resources through the filter. If neither parameter is configured, it means that the evaluation is performed on all resources under the account.

RmsPolicyAssignmentV1Id string
The ID of the policy assignment.
Status string

Specifies the expect status of the policy. The valid values are Enabled and Disabled.

The policy_filter block supports:

Timeouts RmsPolicyAssignmentV1Timeouts
CustomPolicy RmsPolicyAssignmentV1CustomPolicyArgs
Specifies the configuration of the custom policy. The object structure is documented below.
Description string
Specifies the description of the policy assignment, which contain maximum of 512 characters.
Name string
Specifies the name of the policy assignment. The valid length is limited from 1 to 64. Change this parameter will create a new resource.
Parameters map[string]string
Specifies the rule definition of the policy assignment.
Period string

Specifies the period of the policy assignment. The valid values are as follows:

  • One_Hour
  • Three_Hours
  • Six_Hours
  • Twelve_Hours
  • TwentyFour_Hours

Most one of period and policy_filter can be configured.

PolicyDefinitionId string
Specifies the ID of the built-in policy definition. This parameter and custom_policy are alternative.
PolicyFilter RmsPolicyAssignmentV1PolicyFilterArgs

Specifies the configuration used to filter resources. The object structure is documented below.

If the period is configured, it means that the evaluation is performed periodically. If the policy_filter is configured, it means that the evaluation is performed on the specified resources through the filter. If neither parameter is configured, it means that the evaluation is performed on all resources under the account.

RmsPolicyAssignmentV1Id string
The ID of the policy assignment.
Status string

Specifies the expect status of the policy. The valid values are Enabled and Disabled.

The policy_filter block supports:

Timeouts RmsPolicyAssignmentV1TimeoutsArgs
customPolicy RmsPolicyAssignmentV1CustomPolicy
Specifies the configuration of the custom policy. The object structure is documented below.
description String
Specifies the description of the policy assignment, which contain maximum of 512 characters.
name String
Specifies the name of the policy assignment. The valid length is limited from 1 to 64. Change this parameter will create a new resource.
parameters Map<String,String>
Specifies the rule definition of the policy assignment.
period String

Specifies the period of the policy assignment. The valid values are as follows:

  • One_Hour
  • Three_Hours
  • Six_Hours
  • Twelve_Hours
  • TwentyFour_Hours

Most one of period and policy_filter can be configured.

policyDefinitionId String
Specifies the ID of the built-in policy definition. This parameter and custom_policy are alternative.
policyFilter RmsPolicyAssignmentV1PolicyFilter

Specifies the configuration used to filter resources. The object structure is documented below.

If the period is configured, it means that the evaluation is performed periodically. If the policy_filter is configured, it means that the evaluation is performed on the specified resources through the filter. If neither parameter is configured, it means that the evaluation is performed on all resources under the account.

rmsPolicyAssignmentV1Id String
The ID of the policy assignment.
status String

Specifies the expect status of the policy. The valid values are Enabled and Disabled.

The policy_filter block supports:

timeouts RmsPolicyAssignmentV1Timeouts
customPolicy RmsPolicyAssignmentV1CustomPolicy
Specifies the configuration of the custom policy. The object structure is documented below.
description string
Specifies the description of the policy assignment, which contain maximum of 512 characters.
name string
Specifies the name of the policy assignment. The valid length is limited from 1 to 64. Change this parameter will create a new resource.
parameters {[key: string]: string}
Specifies the rule definition of the policy assignment.
period string

Specifies the period of the policy assignment. The valid values are as follows:

  • One_Hour
  • Three_Hours
  • Six_Hours
  • Twelve_Hours
  • TwentyFour_Hours

Most one of period and policy_filter can be configured.

policyDefinitionId string
Specifies the ID of the built-in policy definition. This parameter and custom_policy are alternative.
policyFilter RmsPolicyAssignmentV1PolicyFilter

Specifies the configuration used to filter resources. The object structure is documented below.

If the period is configured, it means that the evaluation is performed periodically. If the policy_filter is configured, it means that the evaluation is performed on the specified resources through the filter. If neither parameter is configured, it means that the evaluation is performed on all resources under the account.

rmsPolicyAssignmentV1Id string
The ID of the policy assignment.
status string

Specifies the expect status of the policy. The valid values are Enabled and Disabled.

The policy_filter block supports:

timeouts RmsPolicyAssignmentV1Timeouts
custom_policy RmsPolicyAssignmentV1CustomPolicyArgs
Specifies the configuration of the custom policy. The object structure is documented below.
description str
Specifies the description of the policy assignment, which contain maximum of 512 characters.
name str
Specifies the name of the policy assignment. The valid length is limited from 1 to 64. Change this parameter will create a new resource.
parameters Mapping[str, str]
Specifies the rule definition of the policy assignment.
period str

Specifies the period of the policy assignment. The valid values are as follows:

  • One_Hour
  • Three_Hours
  • Six_Hours
  • Twelve_Hours
  • TwentyFour_Hours

Most one of period and policy_filter can be configured.

policy_definition_id str
Specifies the ID of the built-in policy definition. This parameter and custom_policy are alternative.
policy_filter RmsPolicyAssignmentV1PolicyFilterArgs

Specifies the configuration used to filter resources. The object structure is documented below.

If the period is configured, it means that the evaluation is performed periodically. If the policy_filter is configured, it means that the evaluation is performed on the specified resources through the filter. If neither parameter is configured, it means that the evaluation is performed on all resources under the account.

rms_policy_assignment_v1_id str
The ID of the policy assignment.
status str

Specifies the expect status of the policy. The valid values are Enabled and Disabled.

The policy_filter block supports:

timeouts RmsPolicyAssignmentV1TimeoutsArgs
customPolicy Property Map
Specifies the configuration of the custom policy. The object structure is documented below.
description String
Specifies the description of the policy assignment, which contain maximum of 512 characters.
name String
Specifies the name of the policy assignment. The valid length is limited from 1 to 64. Change this parameter will create a new resource.
parameters Map<String>
Specifies the rule definition of the policy assignment.
period String

Specifies the period of the policy assignment. The valid values are as follows:

  • One_Hour
  • Three_Hours
  • Six_Hours
  • Twelve_Hours
  • TwentyFour_Hours

Most one of period and policy_filter can be configured.

policyDefinitionId String
Specifies the ID of the built-in policy definition. This parameter and custom_policy are alternative.
policyFilter Property Map

Specifies the configuration used to filter resources. The object structure is documented below.

If the period is configured, it means that the evaluation is performed periodically. If the policy_filter is configured, it means that the evaluation is performed on the specified resources through the filter. If neither parameter is configured, it means that the evaluation is performed on all resources under the account.

rmsPolicyAssignmentV1Id String
The ID of the policy assignment.
status String

Specifies the expect status of the policy. The valid values are Enabled and Disabled.

The policy_filter block supports:

timeouts Property Map

Outputs

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

CreatedAt string
The creation time of the policy assignment.
Id string
The provider-assigned unique ID for this managed resource.
Type string
The type of the policy assignment. The valid values are as follows:

  • builtin
  • custom
UpdatedAt string
The latest update time of the policy assignment.
CreatedAt string
The creation time of the policy assignment.
Id string
The provider-assigned unique ID for this managed resource.
Type string
The type of the policy assignment. The valid values are as follows:

  • builtin
  • custom
UpdatedAt string
The latest update time of the policy assignment.
createdAt String
The creation time of the policy assignment.
id String
The provider-assigned unique ID for this managed resource.
type String
The type of the policy assignment. The valid values are as follows:

  • builtin
  • custom
updatedAt String
The latest update time of the policy assignment.
createdAt string
The creation time of the policy assignment.
id string
The provider-assigned unique ID for this managed resource.
type string
The type of the policy assignment. The valid values are as follows:

  • builtin
  • custom
updatedAt string
The latest update time of the policy assignment.
created_at str
The creation time of the policy assignment.
id str
The provider-assigned unique ID for this managed resource.
type str
The type of the policy assignment. The valid values are as follows:

  • builtin
  • custom
updated_at str
The latest update time of the policy assignment.
createdAt String
The creation time of the policy assignment.
id String
The provider-assigned unique ID for this managed resource.
type String
The type of the policy assignment. The valid values are as follows:

  • builtin
  • custom
updatedAt String
The latest update time of the policy assignment.

Look up Existing RmsPolicyAssignmentV1 Resource

Get an existing RmsPolicyAssignmentV1 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?: RmsPolicyAssignmentV1State, opts?: CustomResourceOptions): RmsPolicyAssignmentV1
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        created_at: Optional[str] = None,
        custom_policy: Optional[RmsPolicyAssignmentV1CustomPolicyArgs] = None,
        description: Optional[str] = None,
        name: Optional[str] = None,
        parameters: Optional[Mapping[str, str]] = None,
        period: Optional[str] = None,
        policy_definition_id: Optional[str] = None,
        policy_filter: Optional[RmsPolicyAssignmentV1PolicyFilterArgs] = None,
        rms_policy_assignment_v1_id: Optional[str] = None,
        status: Optional[str] = None,
        timeouts: Optional[RmsPolicyAssignmentV1TimeoutsArgs] = None,
        type: Optional[str] = None,
        updated_at: Optional[str] = None) -> RmsPolicyAssignmentV1
func GetRmsPolicyAssignmentV1(ctx *Context, name string, id IDInput, state *RmsPolicyAssignmentV1State, opts ...ResourceOption) (*RmsPolicyAssignmentV1, error)
public static RmsPolicyAssignmentV1 Get(string name, Input<string> id, RmsPolicyAssignmentV1State? state, CustomResourceOptions? opts = null)
public static RmsPolicyAssignmentV1 get(String name, Output<String> id, RmsPolicyAssignmentV1State state, CustomResourceOptions options)
resources:  _:    type: opentelekomcloud:RmsPolicyAssignmentV1    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
CreatedAt string
The creation time of the policy assignment.
CustomPolicy RmsPolicyAssignmentV1CustomPolicy
Specifies the configuration of the custom policy. The object structure is documented below.
Description string
Specifies the description of the policy assignment, which contain maximum of 512 characters.
Name string
Specifies the name of the policy assignment. The valid length is limited from 1 to 64. Change this parameter will create a new resource.
Parameters Dictionary<string, string>
Specifies the rule definition of the policy assignment.
Period string

Specifies the period of the policy assignment. The valid values are as follows:

  • One_Hour
  • Three_Hours
  • Six_Hours
  • Twelve_Hours
  • TwentyFour_Hours

Most one of period and policy_filter can be configured.

PolicyDefinitionId string
Specifies the ID of the built-in policy definition. This parameter and custom_policy are alternative.
PolicyFilter RmsPolicyAssignmentV1PolicyFilter

Specifies the configuration used to filter resources. The object structure is documented below.

If the period is configured, it means that the evaluation is performed periodically. If the policy_filter is configured, it means that the evaluation is performed on the specified resources through the filter. If neither parameter is configured, it means that the evaluation is performed on all resources under the account.

RmsPolicyAssignmentV1Id string
The ID of the policy assignment.
Status string

Specifies the expect status of the policy. The valid values are Enabled and Disabled.

The policy_filter block supports:

Timeouts RmsPolicyAssignmentV1Timeouts
Type string
The type of the policy assignment. The valid values are as follows:

  • builtin
  • custom
UpdatedAt string
The latest update time of the policy assignment.
CreatedAt string
The creation time of the policy assignment.
CustomPolicy RmsPolicyAssignmentV1CustomPolicyArgs
Specifies the configuration of the custom policy. The object structure is documented below.
Description string
Specifies the description of the policy assignment, which contain maximum of 512 characters.
Name string
Specifies the name of the policy assignment. The valid length is limited from 1 to 64. Change this parameter will create a new resource.
Parameters map[string]string
Specifies the rule definition of the policy assignment.
Period string

Specifies the period of the policy assignment. The valid values are as follows:

  • One_Hour
  • Three_Hours
  • Six_Hours
  • Twelve_Hours
  • TwentyFour_Hours

Most one of period and policy_filter can be configured.

PolicyDefinitionId string
Specifies the ID of the built-in policy definition. This parameter and custom_policy are alternative.
PolicyFilter RmsPolicyAssignmentV1PolicyFilterArgs

Specifies the configuration used to filter resources. The object structure is documented below.

If the period is configured, it means that the evaluation is performed periodically. If the policy_filter is configured, it means that the evaluation is performed on the specified resources through the filter. If neither parameter is configured, it means that the evaluation is performed on all resources under the account.

RmsPolicyAssignmentV1Id string
The ID of the policy assignment.
Status string

Specifies the expect status of the policy. The valid values are Enabled and Disabled.

The policy_filter block supports:

Timeouts RmsPolicyAssignmentV1TimeoutsArgs
Type string
The type of the policy assignment. The valid values are as follows:

  • builtin
  • custom
UpdatedAt string
The latest update time of the policy assignment.
createdAt String
The creation time of the policy assignment.
customPolicy RmsPolicyAssignmentV1CustomPolicy
Specifies the configuration of the custom policy. The object structure is documented below.
description String
Specifies the description of the policy assignment, which contain maximum of 512 characters.
name String
Specifies the name of the policy assignment. The valid length is limited from 1 to 64. Change this parameter will create a new resource.
parameters Map<String,String>
Specifies the rule definition of the policy assignment.
period String

Specifies the period of the policy assignment. The valid values are as follows:

  • One_Hour
  • Three_Hours
  • Six_Hours
  • Twelve_Hours
  • TwentyFour_Hours

Most one of period and policy_filter can be configured.

policyDefinitionId String
Specifies the ID of the built-in policy definition. This parameter and custom_policy are alternative.
policyFilter RmsPolicyAssignmentV1PolicyFilter

Specifies the configuration used to filter resources. The object structure is documented below.

If the period is configured, it means that the evaluation is performed periodically. If the policy_filter is configured, it means that the evaluation is performed on the specified resources through the filter. If neither parameter is configured, it means that the evaluation is performed on all resources under the account.

rmsPolicyAssignmentV1Id String
The ID of the policy assignment.
status String

Specifies the expect status of the policy. The valid values are Enabled and Disabled.

The policy_filter block supports:

timeouts RmsPolicyAssignmentV1Timeouts
type String
The type of the policy assignment. The valid values are as follows:

  • builtin
  • custom
updatedAt String
The latest update time of the policy assignment.
createdAt string
The creation time of the policy assignment.
customPolicy RmsPolicyAssignmentV1CustomPolicy
Specifies the configuration of the custom policy. The object structure is documented below.
description string
Specifies the description of the policy assignment, which contain maximum of 512 characters.
name string
Specifies the name of the policy assignment. The valid length is limited from 1 to 64. Change this parameter will create a new resource.
parameters {[key: string]: string}
Specifies the rule definition of the policy assignment.
period string

Specifies the period of the policy assignment. The valid values are as follows:

  • One_Hour
  • Three_Hours
  • Six_Hours
  • Twelve_Hours
  • TwentyFour_Hours

Most one of period and policy_filter can be configured.

policyDefinitionId string
Specifies the ID of the built-in policy definition. This parameter and custom_policy are alternative.
policyFilter RmsPolicyAssignmentV1PolicyFilter

Specifies the configuration used to filter resources. The object structure is documented below.

If the period is configured, it means that the evaluation is performed periodically. If the policy_filter is configured, it means that the evaluation is performed on the specified resources through the filter. If neither parameter is configured, it means that the evaluation is performed on all resources under the account.

rmsPolicyAssignmentV1Id string
The ID of the policy assignment.
status string

Specifies the expect status of the policy. The valid values are Enabled and Disabled.

The policy_filter block supports:

timeouts RmsPolicyAssignmentV1Timeouts
type string
The type of the policy assignment. The valid values are as follows:

  • builtin
  • custom
updatedAt string
The latest update time of the policy assignment.
created_at str
The creation time of the policy assignment.
custom_policy RmsPolicyAssignmentV1CustomPolicyArgs
Specifies the configuration of the custom policy. The object structure is documented below.
description str
Specifies the description of the policy assignment, which contain maximum of 512 characters.
name str
Specifies the name of the policy assignment. The valid length is limited from 1 to 64. Change this parameter will create a new resource.
parameters Mapping[str, str]
Specifies the rule definition of the policy assignment.
period str

Specifies the period of the policy assignment. The valid values are as follows:

  • One_Hour
  • Three_Hours
  • Six_Hours
  • Twelve_Hours
  • TwentyFour_Hours

Most one of period and policy_filter can be configured.

policy_definition_id str
Specifies the ID of the built-in policy definition. This parameter and custom_policy are alternative.
policy_filter RmsPolicyAssignmentV1PolicyFilterArgs

Specifies the configuration used to filter resources. The object structure is documented below.

If the period is configured, it means that the evaluation is performed periodically. If the policy_filter is configured, it means that the evaluation is performed on the specified resources through the filter. If neither parameter is configured, it means that the evaluation is performed on all resources under the account.

rms_policy_assignment_v1_id str
The ID of the policy assignment.
status str

Specifies the expect status of the policy. The valid values are Enabled and Disabled.

The policy_filter block supports:

timeouts RmsPolicyAssignmentV1TimeoutsArgs
type str
The type of the policy assignment. The valid values are as follows:

  • builtin
  • custom
updated_at str
The latest update time of the policy assignment.
createdAt String
The creation time of the policy assignment.
customPolicy Property Map
Specifies the configuration of the custom policy. The object structure is documented below.
description String
Specifies the description of the policy assignment, which contain maximum of 512 characters.
name String
Specifies the name of the policy assignment. The valid length is limited from 1 to 64. Change this parameter will create a new resource.
parameters Map<String>
Specifies the rule definition of the policy assignment.
period String

Specifies the period of the policy assignment. The valid values are as follows:

  • One_Hour
  • Three_Hours
  • Six_Hours
  • Twelve_Hours
  • TwentyFour_Hours

Most one of period and policy_filter can be configured.

policyDefinitionId String
Specifies the ID of the built-in policy definition. This parameter and custom_policy are alternative.
policyFilter Property Map

Specifies the configuration used to filter resources. The object structure is documented below.

If the period is configured, it means that the evaluation is performed periodically. If the policy_filter is configured, it means that the evaluation is performed on the specified resources through the filter. If neither parameter is configured, it means that the evaluation is performed on all resources under the account.

rmsPolicyAssignmentV1Id String
The ID of the policy assignment.
status String

Specifies the expect status of the policy. The valid values are Enabled and Disabled.

The policy_filter block supports:

timeouts Property Map
type String
The type of the policy assignment. The valid values are as follows:

  • builtin
  • custom
updatedAt String
The latest update time of the policy assignment.

Supporting Types

RmsPolicyAssignmentV1CustomPolicy
, RmsPolicyAssignmentV1CustomPolicyArgs

AuthType This property is required. string
Specifies the authorization type of the custom policy.
FunctionUrn This property is required. string
Specifies the function URN used to create the custom policy.
AuthValue Dictionary<string, string>
Specifies the authorization value of the custom policy.
AuthType This property is required. string
Specifies the authorization type of the custom policy.
FunctionUrn This property is required. string
Specifies the function URN used to create the custom policy.
AuthValue map[string]string
Specifies the authorization value of the custom policy.
authType This property is required. String
Specifies the authorization type of the custom policy.
functionUrn This property is required. String
Specifies the function URN used to create the custom policy.
authValue Map<String,String>
Specifies the authorization value of the custom policy.
authType This property is required. string
Specifies the authorization type of the custom policy.
functionUrn This property is required. string
Specifies the function URN used to create the custom policy.
authValue {[key: string]: string}
Specifies the authorization value of the custom policy.
auth_type This property is required. str
Specifies the authorization type of the custom policy.
function_urn This property is required. str
Specifies the function URN used to create the custom policy.
auth_value Mapping[str, str]
Specifies the authorization value of the custom policy.
authType This property is required. String
Specifies the authorization type of the custom policy.
functionUrn This property is required. String
Specifies the function URN used to create the custom policy.
authValue Map<String>
Specifies the authorization value of the custom policy.

RmsPolicyAssignmentV1PolicyFilter
, RmsPolicyAssignmentV1PolicyFilterArgs

Region string
Specifies the name of the region to which the filtered resources belong.
ResourceId string
Specifies the resource ID used to filter a specified resource.
ResourceProvider string
Specifies the service name to which the filtered resources belong.
ResourceType string
Specifies the resource type of the filtered resources.
TagKey string
Specifies the tag name used to filter resources. This parameter and resource_id are alternative.
TagValue string

Specifies the tag value used to filter resources. Required if tag_key is set.

The custom_policy block supports:

Region string
Specifies the name of the region to which the filtered resources belong.
ResourceId string
Specifies the resource ID used to filter a specified resource.
ResourceProvider string
Specifies the service name to which the filtered resources belong.
ResourceType string
Specifies the resource type of the filtered resources.
TagKey string
Specifies the tag name used to filter resources. This parameter and resource_id are alternative.
TagValue string

Specifies the tag value used to filter resources. Required if tag_key is set.

The custom_policy block supports:

region String
Specifies the name of the region to which the filtered resources belong.
resourceId String
Specifies the resource ID used to filter a specified resource.
resourceProvider String
Specifies the service name to which the filtered resources belong.
resourceType String
Specifies the resource type of the filtered resources.
tagKey String
Specifies the tag name used to filter resources. This parameter and resource_id are alternative.
tagValue String

Specifies the tag value used to filter resources. Required if tag_key is set.

The custom_policy block supports:

region string
Specifies the name of the region to which the filtered resources belong.
resourceId string
Specifies the resource ID used to filter a specified resource.
resourceProvider string
Specifies the service name to which the filtered resources belong.
resourceType string
Specifies the resource type of the filtered resources.
tagKey string
Specifies the tag name used to filter resources. This parameter and resource_id are alternative.
tagValue string

Specifies the tag value used to filter resources. Required if tag_key is set.

The custom_policy block supports:

region str
Specifies the name of the region to which the filtered resources belong.
resource_id str
Specifies the resource ID used to filter a specified resource.
resource_provider str
Specifies the service name to which the filtered resources belong.
resource_type str
Specifies the resource type of the filtered resources.
tag_key str
Specifies the tag name used to filter resources. This parameter and resource_id are alternative.
tag_value str

Specifies the tag value used to filter resources. Required if tag_key is set.

The custom_policy block supports:

region String
Specifies the name of the region to which the filtered resources belong.
resourceId String
Specifies the resource ID used to filter a specified resource.
resourceProvider String
Specifies the service name to which the filtered resources belong.
resourceType String
Specifies the resource type of the filtered resources.
tagKey String
Specifies the tag name used to filter resources. This parameter and resource_id are alternative.
tagValue String

Specifies the tag value used to filter resources. Required if tag_key is set.

The custom_policy block supports:

RmsPolicyAssignmentV1Timeouts
, RmsPolicyAssignmentV1TimeoutsArgs

Create string
Update string
Create string
Update string
create String
update String
create string
update string
create str
update str
create String
update String

Import

Policy assignments can be imported using their id, e.g.

bash

$ pulumi import opentelekomcloud:index/rmsPolicyAssignmentV1:RmsPolicyAssignmentV1 test 63f48e3762ce955981ab7e25
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
License
Notes
This Pulumi package is based on the opentelekomcloud Terraform Provider.