ise.deviceadmin.PolicySetUpdateRanks
Explore with Pulumi AI
This resource is used to bulk update rank field in device admin policy set. It serves as a workaround for the ISE API/Backend limitation which restricts rank assignments to a strictly incremental sequence. By utilizing this resource and device_admin_policy_set resource, you can bypass the APIs limitation. Creation of this resource is performing PUT operation (Update) and it only tracks rank field. When this resource is destroyed, no action is performed on ISE and resource is just removed from state.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ise from "@pulumi/ise";
const example = new ise.deviceadmin.PolicySetUpdateRanks("example", {policies: [{
id: "d82952cb-b901-4b09-b363-5ebf39bdbaf9",
rank: 0,
}]});
import pulumi
import pulumi_ise as ise
example = ise.deviceadmin.PolicySetUpdateRanks("example", policies=[{
"id": "d82952cb-b901-4b09-b363-5ebf39bdbaf9",
"rank": 0,
}])
package main
import (
"github.com/pulumi/pulumi-ise/sdk/go/ise/deviceadmin"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := deviceadmin.NewPolicySetUpdateRanks(ctx, "example", &deviceadmin.PolicySetUpdateRanksArgs{
Policies: deviceadmin.PolicySetUpdateRanksPolicyArray{
&deviceadmin.PolicySetUpdateRanksPolicyArgs{
Id: pulumi.String("d82952cb-b901-4b09-b363-5ebf39bdbaf9"),
Rank: pulumi.Int(0),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ise = Pulumi.Ise;
return await Deployment.RunAsync(() =>
{
var example = new Ise.DeviceAdmin.PolicySetUpdateRanks("example", new()
{
Policies = new[]
{
new Ise.DeviceAdmin.Inputs.PolicySetUpdateRanksPolicyArgs
{
Id = "d82952cb-b901-4b09-b363-5ebf39bdbaf9",
Rank = 0,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ise.deviceadmin.PolicySetUpdateRanks;
import com.pulumi.ise.deviceadmin.PolicySetUpdateRanksArgs;
import com.pulumi.ise.deviceadmin.inputs.PolicySetUpdateRanksPolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new PolicySetUpdateRanks("example", PolicySetUpdateRanksArgs.builder()
.policies(PolicySetUpdateRanksPolicyArgs.builder()
.id("d82952cb-b901-4b09-b363-5ebf39bdbaf9")
.rank(0)
.build())
.build());
}
}
resources:
example:
type: ise:deviceadmin:PolicySetUpdateRanks
properties:
policies:
- id: d82952cb-b901-4b09-b363-5ebf39bdbaf9
rank: 0
Create PolicySetUpdateRanks Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PolicySetUpdateRanks(name: string, args?: PolicySetUpdateRanksArgs, opts?: CustomResourceOptions);
@overload
def PolicySetUpdateRanks(resource_name: str,
args: Optional[PolicySetUpdateRanksArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def PolicySetUpdateRanks(resource_name: str,
opts: Optional[ResourceOptions] = None,
policies: Optional[Sequence[PolicySetUpdateRanksPolicyArgs]] = None)
func NewPolicySetUpdateRanks(ctx *Context, name string, args *PolicySetUpdateRanksArgs, opts ...ResourceOption) (*PolicySetUpdateRanks, error)
public PolicySetUpdateRanks(string name, PolicySetUpdateRanksArgs? args = null, CustomResourceOptions? opts = null)
public PolicySetUpdateRanks(String name, PolicySetUpdateRanksArgs args)
public PolicySetUpdateRanks(String name, PolicySetUpdateRanksArgs args, CustomResourceOptions options)
type: ise:deviceadmin:PolicySetUpdateRanks
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args PolicySetUpdateRanksArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args PolicySetUpdateRanksArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args PolicySetUpdateRanksArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PolicySetUpdateRanksArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PolicySetUpdateRanksArgs
- 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 policySetUpdateRanksResource = new Ise.DeviceAdmin.PolicySetUpdateRanks("policySetUpdateRanksResource", new()
{
Policies = new[]
{
new Ise.DeviceAdmin.Inputs.PolicySetUpdateRanksPolicyArgs
{
Rank = 0,
Id = "string",
},
},
});
example, err := deviceadmin.NewPolicySetUpdateRanks(ctx, "policySetUpdateRanksResource", &deviceadmin.PolicySetUpdateRanksArgs{
Policies: deviceadmin.PolicySetUpdateRanksPolicyArray{
&deviceadmin.PolicySetUpdateRanksPolicyArgs{
Rank: pulumi.Int(0),
Id: pulumi.String("string"),
},
},
})
var policySetUpdateRanksResource = new com.pulumi.ise.deviceadmin.PolicySetUpdateRanks("policySetUpdateRanksResource", com.pulumi.ise.deviceadmin.PolicySetUpdateRanksArgs.builder()
.policies(PolicySetUpdateRanksPolicyArgs.builder()
.rank(0)
.id("string")
.build())
.build());
policy_set_update_ranks_resource = ise.deviceadmin.PolicySetUpdateRanks("policySetUpdateRanksResource", policies=[{
"rank": 0,
"id": "string",
}])
const policySetUpdateRanksResource = new ise.deviceadmin.PolicySetUpdateRanks("policySetUpdateRanksResource", {policies: [{
rank: 0,
id: "string",
}]});
type: ise:deviceadmin:PolicySetUpdateRanks
properties:
policies:
- id: string
rank: 0
PolicySetUpdateRanks 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 PolicySetUpdateRanks resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the PolicySetUpdateRanks resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing PolicySetUpdateRanks Resource
Get an existing PolicySetUpdateRanks 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?: PolicySetUpdateRanksState, opts?: CustomResourceOptions): PolicySetUpdateRanks
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
policies: Optional[Sequence[PolicySetUpdateRanksPolicyArgs]] = None) -> PolicySetUpdateRanks
func GetPolicySetUpdateRanks(ctx *Context, name string, id IDInput, state *PolicySetUpdateRanksState, opts ...ResourceOption) (*PolicySetUpdateRanks, error)
public static PolicySetUpdateRanks Get(string name, Input<string> id, PolicySetUpdateRanksState? state, CustomResourceOptions? opts = null)
public static PolicySetUpdateRanks get(String name, Output<String> id, PolicySetUpdateRanksState state, CustomResourceOptions options)
resources: _: type: ise:deviceadmin:PolicySetUpdateRanks get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
Supporting Types
PolicySetUpdateRanksPolicy, PolicySetUpdateRanksPolicyArgs
Package Details
- Repository
- ise pulumi/pulumi-ise
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ise
Terraform Provider.