okta.inline.Hook
Explore with Pulumi AI
Creates an inline hook.
This resource allows you to create and configure an inline hook.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";
const example = new okta.inline.Hook("example", {
auth: {
key: "Authorization",
type: "HEADER",
value: "secret",
},
channel: {
method: "POST",
uri: "https://example.com/test",
version: "1.0.0",
},
type: "com.okta.oauth2.tokens.transform",
version: "1.0.0",
});
import pulumi
import pulumi_okta as okta
example = okta.inline.Hook("example",
auth={
"key": "Authorization",
"type": "HEADER",
"value": "secret",
},
channel={
"method": "POST",
"uri": "https://example.com/test",
"version": "1.0.0",
},
type="com.okta.oauth2.tokens.transform",
version="1.0.0")
package main
import (
"github.com/pulumi/pulumi-okta/sdk/v4/go/okta/inline"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := inline.NewHook(ctx, "example", &inline.HookArgs{
Auth: pulumi.StringMap{
"key": pulumi.String("Authorization"),
"type": pulumi.String("HEADER"),
"value": pulumi.String("secret"),
},
Channel: pulumi.StringMap{
"method": pulumi.String("POST"),
"uri": pulumi.String("https://example.com/test"),
"version": pulumi.String("1.0.0"),
},
Type: pulumi.String("com.okta.oauth2.tokens.transform"),
Version: pulumi.String("1.0.0"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Okta = Pulumi.Okta;
return await Deployment.RunAsync(() =>
{
var example = new Okta.Inline.Hook("example", new()
{
Auth =
{
{ "key", "Authorization" },
{ "type", "HEADER" },
{ "value", "secret" },
},
Channel =
{
{ "method", "POST" },
{ "uri", "https://example.com/test" },
{ "version", "1.0.0" },
},
Type = "com.okta.oauth2.tokens.transform",
Version = "1.0.0",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.okta.inline.Hook;
import com.pulumi.okta.inline.HookArgs;
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 Hook("example", HookArgs.builder()
.auth(Map.ofEntries(
Map.entry("key", "Authorization"),
Map.entry("type", "HEADER"),
Map.entry("value", "secret")
))
.channel(Map.ofEntries(
Map.entry("method", "POST"),
Map.entry("uri", "https://example.com/test"),
Map.entry("version", "1.0.0")
))
.type("com.okta.oauth2.tokens.transform")
.version("1.0.0")
.build());
}
}
resources:
example:
type: okta:inline:Hook
properties:
auth:
key: Authorization
type: HEADER
value: secret
channel:
method: POST
uri: https://example.com/test
version: 1.0.0
type: com.okta.oauth2.tokens.transform
version: 1.0.0
Create Hook Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Hook(name: string, args: HookArgs, opts?: CustomResourceOptions);
@overload
def Hook(resource_name: str,
args: HookArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Hook(resource_name: str,
opts: Optional[ResourceOptions] = None,
channel: Optional[Mapping[str, str]] = None,
type: Optional[str] = None,
version: Optional[str] = None,
auth: Optional[Mapping[str, str]] = None,
headers: Optional[Sequence[HookHeaderArgs]] = None,
name: Optional[str] = None,
status: Optional[str] = None)
func NewHook(ctx *Context, name string, args HookArgs, opts ...ResourceOption) (*Hook, error)
public Hook(string name, HookArgs args, CustomResourceOptions? opts = null)
type: okta:inline:Hook
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 HookArgs
- 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 HookArgs
- 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 HookArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HookArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args HookArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Example
The following reference example uses placeholder values for all input properties.
var hookResource = new Okta.Inline.Hook("hookResource", new()
{
Channel =
{
{ "string", "string" },
},
Type = "string",
Version = "string",
Auth =
{
{ "string", "string" },
},
Headers = new[]
{
new Okta.Inline.Inputs.HookHeaderArgs
{
Key = "string",
Value = "string",
},
},
Name = "string",
Status = "string",
});
example, err := inline.NewHook(ctx, "hookResource", &inline.HookArgs{
Channel: pulumi.StringMap{
"string": pulumi.String("string"),
},
Type: pulumi.String("string"),
Version: pulumi.String("string"),
Auth: pulumi.StringMap{
"string": pulumi.String("string"),
},
Headers: inline.HookHeaderArray{
&inline.HookHeaderArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
Name: pulumi.String("string"),
Status: pulumi.String("string"),
})
var hookResource = new Hook("hookResource", HookArgs.builder()
.channel(Map.of("string", "string"))
.type("string")
.version("string")
.auth(Map.of("string", "string"))
.headers(HookHeaderArgs.builder()
.key("string")
.value("string")
.build())
.name("string")
.status("string")
.build());
hook_resource = okta.inline.Hook("hookResource",
channel={
"string": "string",
},
type="string",
version="string",
auth={
"string": "string",
},
headers=[okta.inline.HookHeaderArgs(
key="string",
value="string",
)],
name="string",
status="string")
const hookResource = new okta.inline.Hook("hookResource", {
channel: {
string: "string",
},
type: "string",
version: "string",
auth: {
string: "string",
},
headers: [{
key: "string",
value: "string",
}],
name: "string",
status: "string",
});
type: okta:inline:Hook
properties:
auth:
string: string
channel:
string: string
headers:
- key: string
value: string
name: string
status: string
type: string
version: string
Hook 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 Hook resource accepts the following input properties:
- Channel Dictionary<string, string>
- Details of the endpoint the inline hook will hit.
- Type string
- The type of hook to trigger. Currently, the only supported type is
"HTTP"
. - Version string
- Version of the channel. The currently-supported version is
"1.0.0"
. - Auth Dictionary<string, string>
- Authentication required for inline hook request.
- Headers
List<Hook
Header> - Map of headers to send along in inline hook request.
- Name string
- The inline hook display name.
- Status string
- Default to
ACTIVE
- Channel map[string]string
- Details of the endpoint the inline hook will hit.
- Type string
- The type of hook to trigger. Currently, the only supported type is
"HTTP"
. - Version string
- Version of the channel. The currently-supported version is
"1.0.0"
. - Auth map[string]string
- Authentication required for inline hook request.
- Headers
[]Hook
Header Args - Map of headers to send along in inline hook request.
- Name string
- The inline hook display name.
- Status string
- Default to
ACTIVE
- channel Map<String,String>
- Details of the endpoint the inline hook will hit.
- type String
- The type of hook to trigger. Currently, the only supported type is
"HTTP"
. - version String
- Version of the channel. The currently-supported version is
"1.0.0"
. - auth Map<String,String>
- Authentication required for inline hook request.
- headers
List<Hook
Header> - Map of headers to send along in inline hook request.
- name String
- The inline hook display name.
- status String
- Default to
ACTIVE
- channel {[key: string]: string}
- Details of the endpoint the inline hook will hit.
- type string
- The type of hook to trigger. Currently, the only supported type is
"HTTP"
. - version string
- Version of the channel. The currently-supported version is
"1.0.0"
. - auth {[key: string]: string}
- Authentication required for inline hook request.
- headers
Hook
Header[] - Map of headers to send along in inline hook request.
- name string
- The inline hook display name.
- status string
- Default to
ACTIVE
- channel Mapping[str, str]
- Details of the endpoint the inline hook will hit.
- type str
- The type of hook to trigger. Currently, the only supported type is
"HTTP"
. - version str
- Version of the channel. The currently-supported version is
"1.0.0"
. - auth Mapping[str, str]
- Authentication required for inline hook request.
- headers
Sequence[Hook
Header Args] - Map of headers to send along in inline hook request.
- name str
- The inline hook display name.
- status str
- Default to
ACTIVE
- channel Map<String>
- Details of the endpoint the inline hook will hit.
- type String
- The type of hook to trigger. Currently, the only supported type is
"HTTP"
. - version String
- Version of the channel. The currently-supported version is
"1.0.0"
. - auth Map<String>
- Authentication required for inline hook request.
- headers List<Property Map>
- Map of headers to send along in inline hook request.
- name String
- The inline hook display name.
- status String
- Default to
ACTIVE
Outputs
All input properties are implicitly available as output properties. Additionally, the Hook 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 Hook Resource
Get an existing Hook 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?: HookState, opts?: CustomResourceOptions): Hook
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
auth: Optional[Mapping[str, str]] = None,
channel: Optional[Mapping[str, str]] = None,
headers: Optional[Sequence[HookHeaderArgs]] = None,
name: Optional[str] = None,
status: Optional[str] = None,
type: Optional[str] = None,
version: Optional[str] = None) -> Hook
func GetHook(ctx *Context, name string, id IDInput, state *HookState, opts ...ResourceOption) (*Hook, error)
public static Hook Get(string name, Input<string> id, HookState? state, CustomResourceOptions? opts = null)
public static Hook get(String name, Output<String> id, HookState 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.
- Auth Dictionary<string, string>
- Authentication required for inline hook request.
- Channel Dictionary<string, string>
- Details of the endpoint the inline hook will hit.
- Headers
List<Hook
Header> - Map of headers to send along in inline hook request.
- Name string
- The inline hook display name.
- Status string
- Default to
ACTIVE
- Type string
- The type of hook to trigger. Currently, the only supported type is
"HTTP"
. - Version string
- Version of the channel. The currently-supported version is
"1.0.0"
.
- Auth map[string]string
- Authentication required for inline hook request.
- Channel map[string]string
- Details of the endpoint the inline hook will hit.
- Headers
[]Hook
Header Args - Map of headers to send along in inline hook request.
- Name string
- The inline hook display name.
- Status string
- Default to
ACTIVE
- Type string
- The type of hook to trigger. Currently, the only supported type is
"HTTP"
. - Version string
- Version of the channel. The currently-supported version is
"1.0.0"
.
- auth Map<String,String>
- Authentication required for inline hook request.
- channel Map<String,String>
- Details of the endpoint the inline hook will hit.
- headers
List<Hook
Header> - Map of headers to send along in inline hook request.
- name String
- The inline hook display name.
- status String
- Default to
ACTIVE
- type String
- The type of hook to trigger. Currently, the only supported type is
"HTTP"
. - version String
- Version of the channel. The currently-supported version is
"1.0.0"
.
- auth {[key: string]: string}
- Authentication required for inline hook request.
- channel {[key: string]: string}
- Details of the endpoint the inline hook will hit.
- headers
Hook
Header[] - Map of headers to send along in inline hook request.
- name string
- The inline hook display name.
- status string
- Default to
ACTIVE
- type string
- The type of hook to trigger. Currently, the only supported type is
"HTTP"
. - version string
- Version of the channel. The currently-supported version is
"1.0.0"
.
- auth Mapping[str, str]
- Authentication required for inline hook request.
- channel Mapping[str, str]
- Details of the endpoint the inline hook will hit.
- headers
Sequence[Hook
Header Args] - Map of headers to send along in inline hook request.
- name str
- The inline hook display name.
- status str
- Default to
ACTIVE
- type str
- The type of hook to trigger. Currently, the only supported type is
"HTTP"
. - version str
- Version of the channel. The currently-supported version is
"1.0.0"
.
- auth Map<String>
- Authentication required for inline hook request.
- channel Map<String>
- Details of the endpoint the inline hook will hit.
- headers List<Property Map>
- Map of headers to send along in inline hook request.
- name String
- The inline hook display name.
- status String
- Default to
ACTIVE
- type String
- The type of hook to trigger. Currently, the only supported type is
"HTTP"
. - version String
- Version of the channel. The currently-supported version is
"1.0.0"
.
Supporting Types
HookHeader, HookHeaderArgs
Import
An inline hook can be imported via the Okta ID.
$ pulumi import okta:inline/hook:Hook example <hook id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Okta pulumi/pulumi-okta
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
okta
Terraform Provider.