azapi.ResourceAction
Explore with Pulumi AI
This resource can perform any Azure resource manager resource action.
It’s recommended to use azapi.ResourceAction
resource to perform actions which change a resource’s state, please use azapi.ResourceAction
data source,
if user wants to perform readonly action.
Note When delete
azapi.ResourceAction
, no operation will be performed.
Create ResourceAction Resource
new ResourceAction(name: string, args: ResourceActionArgs, opts?: CustomResourceOptions);
@overload
def ResourceAction(resource_name: str,
opts: Optional[ResourceOptions] = None,
action: Optional[str] = None,
body: Optional[str] = None,
locks: Optional[Sequence[str]] = None,
method: Optional[str] = None,
resource_id: Optional[str] = None,
response_export_values: Optional[Sequence[str]] = None,
type: Optional[str] = None)
@overload
def ResourceAction(resource_name: str,
args: ResourceActionArgs,
opts: Optional[ResourceOptions] = None)
func NewResourceAction(ctx *Context, name string, args ResourceActionArgs, opts ...ResourceOption) (*ResourceAction, error)
public ResourceAction(string name, ResourceActionArgs args, CustomResourceOptions? opts = null)
public ResourceAction(String name, ResourceActionArgs args)
public ResourceAction(String name, ResourceActionArgs args, CustomResourceOptions options)
type: azapi:ResourceAction
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ResourceActionArgs
- 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 ResourceActionArgs
- 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 ResourceActionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ResourceActionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ResourceActionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ResourceAction Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ResourceAction resource accepts the following input properties:
- Resource
Id string The ID of an existing azure source.
- Type string
It is in a format like
<resource-type>@<api-version>
.<resource-type>
is the Azure resource type, for example,Microsoft.Storage/storageAccounts
.<api-version>
is version of the API used to manage this azure resource.- Action string
The name of the resource action. It's also possible to make Http requests towards the resource ID if leave this field empty.
- Body string
A JSON object that contains the request body.
- Locks List<string>
A list of ARM resource IDs which are used to avoid modify azapi resources at the same time.
- Method string
Specifies the Http method of the azure resource action. Allowed values are
POST
,PATCH
,PUT
andDELETE
. Defaults toPOST
.- Response
Export List<string>Values A list of path that needs to be exported from response body. Setting it to
["*"]
will export the full response body. Here's an example. If it sets to["keys"]
, it will set the following json to computed propertyoutput
.import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic; using System.Linq; using Pulumi;
return await Deployment.RunAsync(() => { });
package main import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { return nil }) }
package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; 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) { } }
{}
- Resource
Id string The ID of an existing azure source.
- Type string
It is in a format like
<resource-type>@<api-version>
.<resource-type>
is the Azure resource type, for example,Microsoft.Storage/storageAccounts
.<api-version>
is version of the API used to manage this azure resource.- Action string
The name of the resource action. It's also possible to make Http requests towards the resource ID if leave this field empty.
- Body string
A JSON object that contains the request body.
- Locks []string
A list of ARM resource IDs which are used to avoid modify azapi resources at the same time.
- Method string
Specifies the Http method of the azure resource action. Allowed values are
POST
,PATCH
,PUT
andDELETE
. Defaults toPOST
.- Response
Export []stringValues A list of path that needs to be exported from response body. Setting it to
["*"]
will export the full response body. Here's an example. If it sets to["keys"]
, it will set the following json to computed propertyoutput
.import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic; using System.Linq; using Pulumi;
return await Deployment.RunAsync(() => { });
package main import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { return nil }) }
package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; 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) { } }
{}
- resource
Id String The ID of an existing azure source.
- type String
It is in a format like
<resource-type>@<api-version>
.<resource-type>
is the Azure resource type, for example,Microsoft.Storage/storageAccounts
.<api-version>
is version of the API used to manage this azure resource.- action String
The name of the resource action. It's also possible to make Http requests towards the resource ID if leave this field empty.
- body String
A JSON object that contains the request body.
- locks List<String>
A list of ARM resource IDs which are used to avoid modify azapi resources at the same time.
- method String
Specifies the Http method of the azure resource action. Allowed values are
POST
,PATCH
,PUT
andDELETE
. Defaults toPOST
.- response
Export List<String>Values A list of path that needs to be exported from response body. Setting it to
["*"]
will export the full response body. Here's an example. If it sets to["keys"]
, it will set the following json to computed propertyoutput
.import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic; using System.Linq; using Pulumi;
return await Deployment.RunAsync(() => { });
package main import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { return nil }) }
package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; 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) { } }
{}
- resource
Id string The ID of an existing azure source.
- type string
It is in a format like
<resource-type>@<api-version>
.<resource-type>
is the Azure resource type, for example,Microsoft.Storage/storageAccounts
.<api-version>
is version of the API used to manage this azure resource.- action string
The name of the resource action. It's also possible to make Http requests towards the resource ID if leave this field empty.
- body string
A JSON object that contains the request body.
- locks string[]
A list of ARM resource IDs which are used to avoid modify azapi resources at the same time.
- method string
Specifies the Http method of the azure resource action. Allowed values are
POST
,PATCH
,PUT
andDELETE
. Defaults toPOST
.- response
Export string[]Values A list of path that needs to be exported from response body. Setting it to
["*"]
will export the full response body. Here's an example. If it sets to["keys"]
, it will set the following json to computed propertyoutput
.import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic; using System.Linq; using Pulumi;
return await Deployment.RunAsync(() => { });
package main import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { return nil }) }
package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; 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) { } }
{}
- resource_
id str The ID of an existing azure source.
- type str
It is in a format like
<resource-type>@<api-version>
.<resource-type>
is the Azure resource type, for example,Microsoft.Storage/storageAccounts
.<api-version>
is version of the API used to manage this azure resource.- action str
The name of the resource action. It's also possible to make Http requests towards the resource ID if leave this field empty.
- body str
A JSON object that contains the request body.
- locks Sequence[str]
A list of ARM resource IDs which are used to avoid modify azapi resources at the same time.
- method str
Specifies the Http method of the azure resource action. Allowed values are
POST
,PATCH
,PUT
andDELETE
. Defaults toPOST
.- response_
export_ Sequence[str]values A list of path that needs to be exported from response body. Setting it to
["*"]
will export the full response body. Here's an example. If it sets to["keys"]
, it will set the following json to computed propertyoutput
.import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic; using System.Linq; using Pulumi;
return await Deployment.RunAsync(() => { });
package main import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { return nil }) }
package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; 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) { } }
{}
- resource
Id String The ID of an existing azure source.
- type String
It is in a format like
<resource-type>@<api-version>
.<resource-type>
is the Azure resource type, for example,Microsoft.Storage/storageAccounts
.<api-version>
is version of the API used to manage this azure resource.- action String
The name of the resource action. It's also possible to make Http requests towards the resource ID if leave this field empty.
- body String
A JSON object that contains the request body.
- locks List<String>
A list of ARM resource IDs which are used to avoid modify azapi resources at the same time.
- method String
Specifies the Http method of the azure resource action. Allowed values are
POST
,PATCH
,PUT
andDELETE
. Defaults toPOST
.- response
Export List<String>Values A list of path that needs to be exported from response body. Setting it to
["*"]
will export the full response body. Here's an example. If it sets to["keys"]
, it will set the following json to computed propertyoutput
.import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic; using System.Linq; using Pulumi;
return await Deployment.RunAsync(() => { });
package main import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { return nil }) }
package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; 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) { } }
{}
Outputs
All input properties are implicitly available as output properties. Additionally, the ResourceAction resource produces the following output properties:
Look up Existing ResourceAction Resource
Get an existing ResourceAction 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?: ResourceActionState, opts?: CustomResourceOptions): ResourceAction
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
action: Optional[str] = None,
body: Optional[str] = None,
locks: Optional[Sequence[str]] = None,
method: Optional[str] = None,
output: Optional[str] = None,
resource_id: Optional[str] = None,
response_export_values: Optional[Sequence[str]] = None,
type: Optional[str] = None) -> ResourceAction
func GetResourceAction(ctx *Context, name string, id IDInput, state *ResourceActionState, opts ...ResourceOption) (*ResourceAction, error)
public static ResourceAction Get(string name, Input<string> id, ResourceActionState? state, CustomResourceOptions? opts = null)
public static ResourceAction get(String name, Output<String> id, ResourceActionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Action string
The name of the resource action. It's also possible to make Http requests towards the resource ID if leave this field empty.
- Body string
A JSON object that contains the request body.
- Locks List<string>
A list of ARM resource IDs which are used to avoid modify azapi resources at the same time.
- Method string
Specifies the Http method of the azure resource action. Allowed values are
POST
,PATCH
,PUT
andDELETE
. Defaults toPOST
.- Output string
The output json containing the properties specified in
response_export_values
. Here are some examples to decode json and extract the value.- Resource
Id string The ID of an existing azure source.
- Response
Export List<string>Values A list of path that needs to be exported from response body. Setting it to
["*"]
will export the full response body. Here's an example. If it sets to["keys"]
, it will set the following json to computed propertyoutput
.import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic; using System.Linq; using Pulumi;
return await Deployment.RunAsync(() => { });
package main import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { return nil }) }
package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; 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) { } }
{}
- Type string
It is in a format like
<resource-type>@<api-version>
.<resource-type>
is the Azure resource type, for example,Microsoft.Storage/storageAccounts
.<api-version>
is version of the API used to manage this azure resource.
- Action string
The name of the resource action. It's also possible to make Http requests towards the resource ID if leave this field empty.
- Body string
A JSON object that contains the request body.
- Locks []string
A list of ARM resource IDs which are used to avoid modify azapi resources at the same time.
- Method string
Specifies the Http method of the azure resource action. Allowed values are
POST
,PATCH
,PUT
andDELETE
. Defaults toPOST
.- Output string
The output json containing the properties specified in
response_export_values
. Here are some examples to decode json and extract the value.- Resource
Id string The ID of an existing azure source.
- Response
Export []stringValues A list of path that needs to be exported from response body. Setting it to
["*"]
will export the full response body. Here's an example. If it sets to["keys"]
, it will set the following json to computed propertyoutput
.import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic; using System.Linq; using Pulumi;
return await Deployment.RunAsync(() => { });
package main import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { return nil }) }
package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; 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) { } }
{}
- Type string
It is in a format like
<resource-type>@<api-version>
.<resource-type>
is the Azure resource type, for example,Microsoft.Storage/storageAccounts
.<api-version>
is version of the API used to manage this azure resource.
- action String
The name of the resource action. It's also possible to make Http requests towards the resource ID if leave this field empty.
- body String
A JSON object that contains the request body.
- locks List<String>
A list of ARM resource IDs which are used to avoid modify azapi resources at the same time.
- method String
Specifies the Http method of the azure resource action. Allowed values are
POST
,PATCH
,PUT
andDELETE
. Defaults toPOST
.- output String
The output json containing the properties specified in
response_export_values
. Here are some examples to decode json and extract the value.- resource
Id String The ID of an existing azure source.
- response
Export List<String>Values A list of path that needs to be exported from response body. Setting it to
["*"]
will export the full response body. Here's an example. If it sets to["keys"]
, it will set the following json to computed propertyoutput
.import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic; using System.Linq; using Pulumi;
return await Deployment.RunAsync(() => { });
package main import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { return nil }) }
package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; 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) { } }
{}
- type String
It is in a format like
<resource-type>@<api-version>
.<resource-type>
is the Azure resource type, for example,Microsoft.Storage/storageAccounts
.<api-version>
is version of the API used to manage this azure resource.
- action string
The name of the resource action. It's also possible to make Http requests towards the resource ID if leave this field empty.
- body string
A JSON object that contains the request body.
- locks string[]
A list of ARM resource IDs which are used to avoid modify azapi resources at the same time.
- method string
Specifies the Http method of the azure resource action. Allowed values are
POST
,PATCH
,PUT
andDELETE
. Defaults toPOST
.- output string
The output json containing the properties specified in
response_export_values
. Here are some examples to decode json and extract the value.- resource
Id string The ID of an existing azure source.
- response
Export string[]Values A list of path that needs to be exported from response body. Setting it to
["*"]
will export the full response body. Here's an example. If it sets to["keys"]
, it will set the following json to computed propertyoutput
.import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic; using System.Linq; using Pulumi;
return await Deployment.RunAsync(() => { });
package main import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { return nil }) }
package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; 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) { } }
{}
- type string
It is in a format like
<resource-type>@<api-version>
.<resource-type>
is the Azure resource type, for example,Microsoft.Storage/storageAccounts
.<api-version>
is version of the API used to manage this azure resource.
- action str
The name of the resource action. It's also possible to make Http requests towards the resource ID if leave this field empty.
- body str
A JSON object that contains the request body.
- locks Sequence[str]
A list of ARM resource IDs which are used to avoid modify azapi resources at the same time.
- method str
Specifies the Http method of the azure resource action. Allowed values are
POST
,PATCH
,PUT
andDELETE
. Defaults toPOST
.- output str
The output json containing the properties specified in
response_export_values
. Here are some examples to decode json and extract the value.- resource_
id str The ID of an existing azure source.
- response_
export_ Sequence[str]values A list of path that needs to be exported from response body. Setting it to
["*"]
will export the full response body. Here's an example. If it sets to["keys"]
, it will set the following json to computed propertyoutput
.import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic; using System.Linq; using Pulumi;
return await Deployment.RunAsync(() => { });
package main import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { return nil }) }
package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; 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) { } }
{}
- type str
It is in a format like
<resource-type>@<api-version>
.<resource-type>
is the Azure resource type, for example,Microsoft.Storage/storageAccounts
.<api-version>
is version of the API used to manage this azure resource.
- action String
The name of the resource action. It's also possible to make Http requests towards the resource ID if leave this field empty.
- body String
A JSON object that contains the request body.
- locks List<String>
A list of ARM resource IDs which are used to avoid modify azapi resources at the same time.
- method String
Specifies the Http method of the azure resource action. Allowed values are
POST
,PATCH
,PUT
andDELETE
. Defaults toPOST
.- output String
The output json containing the properties specified in
response_export_values
. Here are some examples to decode json and extract the value.- resource
Id String The ID of an existing azure source.
- response
Export List<String>Values A list of path that needs to be exported from response body. Setting it to
["*"]
will export the full response body. Here's an example. If it sets to["keys"]
, it will set the following json to computed propertyoutput
.import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic; using System.Linq; using Pulumi;
return await Deployment.RunAsync(() => { });
package main import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { return nil }) }
package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; 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) { } }
{}
- type String
It is in a format like
<resource-type>@<api-version>
.<resource-type>
is the Azure resource type, for example,Microsoft.Storage/storageAccounts
.<api-version>
is version of the API used to manage this azure resource.
Package Details
- Repository
- azapi dirien/pulumi-azapi
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azapi
Terraform Provider.