1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. ApmSynthetics
  5. Script
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.ApmSynthetics.Script

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

    This resource provides the Script resource in Oracle Cloud Infrastructure Apm Synthetics service.

    Creates a new script.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testScript = new oci.apmsynthetics.Script("test_script", {
        apmDomainId: testApmDomain.id,
        content: scriptContent,
        contentType: scriptContentType,
        displayName: scriptDisplayName,
        contentFileName: scriptContentFileName,
        definedTags: {
            "foo-namespace.bar-key": "value",
        },
        freeformTags: {
            "bar-key": "value",
        },
        parameters: [{
            paramName: scriptParametersParamName,
            isSecret: scriptParametersIsSecret,
            paramValue: scriptParametersParamValue,
        }],
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_script = oci.apm_synthetics.Script("test_script",
        apm_domain_id=test_apm_domain["id"],
        content=script_content,
        content_type=script_content_type,
        display_name=script_display_name,
        content_file_name=script_content_file_name,
        defined_tags={
            "foo-namespace.bar-key": "value",
        },
        freeform_tags={
            "bar-key": "value",
        },
        parameters=[{
            "param_name": script_parameters_param_name,
            "is_secret": script_parameters_is_secret,
            "param_value": script_parameters_param_value,
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/ApmSynthetics"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ApmSynthetics.NewScript(ctx, "test_script", &ApmSynthetics.ScriptArgs{
    			ApmDomainId:     pulumi.Any(testApmDomain.Id),
    			Content:         pulumi.Any(scriptContent),
    			ContentType:     pulumi.Any(scriptContentType),
    			DisplayName:     pulumi.Any(scriptDisplayName),
    			ContentFileName: pulumi.Any(scriptContentFileName),
    			DefinedTags: pulumi.StringMap{
    				"foo-namespace.bar-key": pulumi.String("value"),
    			},
    			FreeformTags: pulumi.StringMap{
    				"bar-key": pulumi.String("value"),
    			},
    			Parameters: apmsynthetics.ScriptParameterArray{
    				&apmsynthetics.ScriptParameterArgs{
    					ParamName:  pulumi.Any(scriptParametersParamName),
    					IsSecret:   pulumi.Any(scriptParametersIsSecret),
    					ParamValue: pulumi.Any(scriptParametersParamValue),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testScript = new Oci.ApmSynthetics.Script("test_script", new()
        {
            ApmDomainId = testApmDomain.Id,
            Content = scriptContent,
            ContentType = scriptContentType,
            DisplayName = scriptDisplayName,
            ContentFileName = scriptContentFileName,
            DefinedTags = 
            {
                { "foo-namespace.bar-key", "value" },
            },
            FreeformTags = 
            {
                { "bar-key", "value" },
            },
            Parameters = new[]
            {
                new Oci.ApmSynthetics.Inputs.ScriptParameterArgs
                {
                    ParamName = scriptParametersParamName,
                    IsSecret = scriptParametersIsSecret,
                    ParamValue = scriptParametersParamValue,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.ApmSynthetics.Script;
    import com.pulumi.oci.ApmSynthetics.ScriptArgs;
    import com.pulumi.oci.ApmSynthetics.inputs.ScriptParameterArgs;
    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 testScript = new Script("testScript", ScriptArgs.builder()
                .apmDomainId(testApmDomain.id())
                .content(scriptContent)
                .contentType(scriptContentType)
                .displayName(scriptDisplayName)
                .contentFileName(scriptContentFileName)
                .definedTags(Map.of("foo-namespace.bar-key", "value"))
                .freeformTags(Map.of("bar-key", "value"))
                .parameters(ScriptParameterArgs.builder()
                    .paramName(scriptParametersParamName)
                    .isSecret(scriptParametersIsSecret)
                    .paramValue(scriptParametersParamValue)
                    .build())
                .build());
    
        }
    }
    
    resources:
      testScript:
        type: oci:ApmSynthetics:Script
        name: test_script
        properties:
          apmDomainId: ${testApmDomain.id}
          content: ${scriptContent}
          contentType: ${scriptContentType}
          displayName: ${scriptDisplayName}
          contentFileName: ${scriptContentFileName}
          definedTags:
            foo-namespace.bar-key: value
          freeformTags:
            bar-key: value
          parameters:
            - paramName: ${scriptParametersParamName}
              isSecret: ${scriptParametersIsSecret}
              paramValue: ${scriptParametersParamValue}
    

    Create Script Resource

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

    Constructor syntax

    new Script(name: string, args: ScriptArgs, opts?: CustomResourceOptions);
    @overload
    def Script(resource_name: str,
               args: ScriptArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Script(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               apm_domain_id: Optional[str] = None,
               content: Optional[str] = None,
               content_type: Optional[str] = None,
               display_name: Optional[str] = None,
               content_file_name: Optional[str] = None,
               defined_tags: Optional[Mapping[str, str]] = None,
               freeform_tags: Optional[Mapping[str, str]] = None,
               parameters: Optional[Sequence[_apmsynthetics.ScriptParameterArgs]] = None)
    func NewScript(ctx *Context, name string, args ScriptArgs, opts ...ResourceOption) (*Script, error)
    public Script(string name, ScriptArgs args, CustomResourceOptions? opts = null)
    public Script(String name, ScriptArgs args)
    public Script(String name, ScriptArgs args, CustomResourceOptions options)
    
    type: oci:ApmSynthetics:Script
    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 ScriptArgs
    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 ScriptArgs
    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 ScriptArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ScriptArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ScriptArgs
    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 scriptResource = new Oci.ApmSynthetics.Script("scriptResource", new()
    {
        ApmDomainId = "string",
        Content = "string",
        ContentType = "string",
        DisplayName = "string",
        ContentFileName = "string",
        DefinedTags = 
        {
            { "string", "string" },
        },
        FreeformTags = 
        {
            { "string", "string" },
        },
        Parameters = new[]
        {
            new Oci.ApmSynthetics.Inputs.ScriptParameterArgs
            {
                ParamName = "string",
                IsOverwritten = false,
                IsSecret = false,
                ParamValue = "string",
                ScriptParameters = new[]
                {
                    new Oci.ApmSynthetics.Inputs.ScriptParameterScriptParameterArgs
                    {
                        IsSecret = false,
                        ParamName = "string",
                        ParamValue = "string",
                    },
                },
            },
        },
    });
    
    example, err := ApmSynthetics.NewScript(ctx, "scriptResource", &ApmSynthetics.ScriptArgs{
    	ApmDomainId:     pulumi.String("string"),
    	Content:         pulumi.String("string"),
    	ContentType:     pulumi.String("string"),
    	DisplayName:     pulumi.String("string"),
    	ContentFileName: pulumi.String("string"),
    	DefinedTags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	FreeformTags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Parameters: apmsynthetics.ScriptParameterArray{
    		&apmsynthetics.ScriptParameterArgs{
    			ParamName:     pulumi.String("string"),
    			IsOverwritten: pulumi.Bool(false),
    			IsSecret:      pulumi.Bool(false),
    			ParamValue:    pulumi.String("string"),
    			ScriptParameters: apmsynthetics.ScriptParameterScriptParameterArray{
    				&apmsynthetics.ScriptParameterScriptParameterArgs{
    					IsSecret:   pulumi.Bool(false),
    					ParamName:  pulumi.String("string"),
    					ParamValue: pulumi.String("string"),
    				},
    			},
    		},
    	},
    })
    
    var scriptResource = new Script("scriptResource", ScriptArgs.builder()
        .apmDomainId("string")
        .content("string")
        .contentType("string")
        .displayName("string")
        .contentFileName("string")
        .definedTags(Map.of("string", "string"))
        .freeformTags(Map.of("string", "string"))
        .parameters(ScriptParameterArgs.builder()
            .paramName("string")
            .isOverwritten(false)
            .isSecret(false)
            .paramValue("string")
            .scriptParameters(ScriptParameterScriptParameterArgs.builder()
                .isSecret(false)
                .paramName("string")
                .paramValue("string")
                .build())
            .build())
        .build());
    
    script_resource = oci.apm_synthetics.Script("scriptResource",
        apm_domain_id="string",
        content="string",
        content_type="string",
        display_name="string",
        content_file_name="string",
        defined_tags={
            "string": "string",
        },
        freeform_tags={
            "string": "string",
        },
        parameters=[oci.apm_synthetics.ScriptParameterArgs(
            param_name="string",
            is_overwritten=False,
            is_secret=False,
            param_value="string",
            script_parameters=[oci.apm_synthetics.ScriptParameterScriptParameterArgs(
                is_secret=False,
                param_name="string",
                param_value="string",
            )],
        )])
    
    const scriptResource = new oci.apmsynthetics.Script("scriptResource", {
        apmDomainId: "string",
        content: "string",
        contentType: "string",
        displayName: "string",
        contentFileName: "string",
        definedTags: {
            string: "string",
        },
        freeformTags: {
            string: "string",
        },
        parameters: [{
            paramName: "string",
            isOverwritten: false,
            isSecret: false,
            paramValue: "string",
            scriptParameters: [{
                isSecret: false,
                paramName: "string",
                paramValue: "string",
            }],
        }],
    });
    
    type: oci:ApmSynthetics:Script
    properties:
        apmDomainId: string
        content: string
        contentFileName: string
        contentType: string
        definedTags:
            string: string
        displayName: string
        freeformTags:
            string: string
        parameters:
            - isOverwritten: false
              isSecret: false
              paramName: string
              paramValue: string
              scriptParameters:
                - isSecret: false
                  paramName: string
                  paramValue: string
    

    Script 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 Script resource accepts the following input properties:

    ApmDomainId string
    (Updatable) The APM domain ID the request is intended for.
    Content string
    (Updatable) The content of the script. It may contain custom-defined tags that can be used for setting dynamic parameters. The format to set dynamic parameters is: <ORAP><ON>param name</ON><OV>param value</OV><OS>isParamValueSecret(true/false)</OS></ORAP>. Param value and isParamValueSecret are optional, the default value for isParamValueSecret is false. Examples: With mandatory param name : <ORAP><ON>param name</ON></ORAP> With parameter name and value : <ORAP><ON>param name</ON><OV>param value</OV></ORAP> Note that the content is valid if it matches the given content type. For example, if the content type is SIDE, then the content should be in Side script format. If the content type is JS, then the content should be in JavaScript format.
    ContentType string
    (Updatable) Content type of script.
    DisplayName string
    (Updatable) Unique name that can be edited. The name should not contain any confidential information.
    ContentFileName string
    (Updatable) File name of uploaded script content.
    DefinedTags Dictionary<string, string>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    FreeformTags Dictionary<string, string>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Parameters List<ScriptParameter>
    (Updatable) List of script parameters. Example: [{"paramName": "userid", "paramValue":"testuser", "isSecret": false}]
    ApmDomainId string
    (Updatable) The APM domain ID the request is intended for.
    Content string
    (Updatable) The content of the script. It may contain custom-defined tags that can be used for setting dynamic parameters. The format to set dynamic parameters is: <ORAP><ON>param name</ON><OV>param value</OV><OS>isParamValueSecret(true/false)</OS></ORAP>. Param value and isParamValueSecret are optional, the default value for isParamValueSecret is false. Examples: With mandatory param name : <ORAP><ON>param name</ON></ORAP> With parameter name and value : <ORAP><ON>param name</ON><OV>param value</OV></ORAP> Note that the content is valid if it matches the given content type. For example, if the content type is SIDE, then the content should be in Side script format. If the content type is JS, then the content should be in JavaScript format.
    ContentType string
    (Updatable) Content type of script.
    DisplayName string
    (Updatable) Unique name that can be edited. The name should not contain any confidential information.
    ContentFileName string
    (Updatable) File name of uploaded script content.
    DefinedTags map[string]string
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    FreeformTags map[string]string
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Parameters []ScriptParameterArgs
    (Updatable) List of script parameters. Example: [{"paramName": "userid", "paramValue":"testuser", "isSecret": false}]
    apmDomainId String
    (Updatable) The APM domain ID the request is intended for.
    content String
    (Updatable) The content of the script. It may contain custom-defined tags that can be used for setting dynamic parameters. The format to set dynamic parameters is: <ORAP><ON>param name</ON><OV>param value</OV><OS>isParamValueSecret(true/false)</OS></ORAP>. Param value and isParamValueSecret are optional, the default value for isParamValueSecret is false. Examples: With mandatory param name : <ORAP><ON>param name</ON></ORAP> With parameter name and value : <ORAP><ON>param name</ON><OV>param value</OV></ORAP> Note that the content is valid if it matches the given content type. For example, if the content type is SIDE, then the content should be in Side script format. If the content type is JS, then the content should be in JavaScript format.
    contentType String
    (Updatable) Content type of script.
    displayName String
    (Updatable) Unique name that can be edited. The name should not contain any confidential information.
    contentFileName String
    (Updatable) File name of uploaded script content.
    definedTags Map<String,String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    freeformTags Map<String,String>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    parameters List<ScriptParameter>
    (Updatable) List of script parameters. Example: [{"paramName": "userid", "paramValue":"testuser", "isSecret": false}]
    apmDomainId string
    (Updatable) The APM domain ID the request is intended for.
    content string
    (Updatable) The content of the script. It may contain custom-defined tags that can be used for setting dynamic parameters. The format to set dynamic parameters is: <ORAP><ON>param name</ON><OV>param value</OV><OS>isParamValueSecret(true/false)</OS></ORAP>. Param value and isParamValueSecret are optional, the default value for isParamValueSecret is false. Examples: With mandatory param name : <ORAP><ON>param name</ON></ORAP> With parameter name and value : <ORAP><ON>param name</ON><OV>param value</OV></ORAP> Note that the content is valid if it matches the given content type. For example, if the content type is SIDE, then the content should be in Side script format. If the content type is JS, then the content should be in JavaScript format.
    contentType string
    (Updatable) Content type of script.
    displayName string
    (Updatable) Unique name that can be edited. The name should not contain any confidential information.
    contentFileName string
    (Updatable) File name of uploaded script content.
    definedTags {[key: string]: string}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    freeformTags {[key: string]: string}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    parameters ScriptParameter[]
    (Updatable) List of script parameters. Example: [{"paramName": "userid", "paramValue":"testuser", "isSecret": false}]
    apm_domain_id str
    (Updatable) The APM domain ID the request is intended for.
    content str
    (Updatable) The content of the script. It may contain custom-defined tags that can be used for setting dynamic parameters. The format to set dynamic parameters is: <ORAP><ON>param name</ON><OV>param value</OV><OS>isParamValueSecret(true/false)</OS></ORAP>. Param value and isParamValueSecret are optional, the default value for isParamValueSecret is false. Examples: With mandatory param name : <ORAP><ON>param name</ON></ORAP> With parameter name and value : <ORAP><ON>param name</ON><OV>param value</OV></ORAP> Note that the content is valid if it matches the given content type. For example, if the content type is SIDE, then the content should be in Side script format. If the content type is JS, then the content should be in JavaScript format.
    content_type str
    (Updatable) Content type of script.
    display_name str
    (Updatable) Unique name that can be edited. The name should not contain any confidential information.
    content_file_name str
    (Updatable) File name of uploaded script content.
    defined_tags Mapping[str, str]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    freeform_tags Mapping[str, str]
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    parameters Sequence[apmsynthetics.ScriptParameterArgs]
    (Updatable) List of script parameters. Example: [{"paramName": "userid", "paramValue":"testuser", "isSecret": false}]
    apmDomainId String
    (Updatable) The APM domain ID the request is intended for.
    content String
    (Updatable) The content of the script. It may contain custom-defined tags that can be used for setting dynamic parameters. The format to set dynamic parameters is: <ORAP><ON>param name</ON><OV>param value</OV><OS>isParamValueSecret(true/false)</OS></ORAP>. Param value and isParamValueSecret are optional, the default value for isParamValueSecret is false. Examples: With mandatory param name : <ORAP><ON>param name</ON></ORAP> With parameter name and value : <ORAP><ON>param name</ON><OV>param value</OV></ORAP> Note that the content is valid if it matches the given content type. For example, if the content type is SIDE, then the content should be in Side script format. If the content type is JS, then the content should be in JavaScript format.
    contentType String
    (Updatable) Content type of script.
    displayName String
    (Updatable) Unique name that can be edited. The name should not contain any confidential information.
    contentFileName String
    (Updatable) File name of uploaded script content.
    definedTags Map<String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    freeformTags Map<String>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    parameters List<Property Map>
    (Updatable) List of script parameters. Example: [{"paramName": "userid", "paramValue":"testuser", "isSecret": false}]

    Outputs

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

    ContentSizeInBytes int
    Size of the script content.
    Id string
    The provider-assigned unique ID for this managed resource.
    MonitorStatusCountMaps List<ScriptMonitorStatusCountMap>
    Details of the monitor count per state. Example: { "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
    TimeCreated string
    The time the resource was created, expressed in RFC 3339 timestamp format. Example: 2020-02-12T22:47:12.613Z
    TimeUpdated string
    The time the resource was updated, expressed in RFC 3339 timestamp format. Example: 2020-02-13T22:47:12.613Z
    TimeUploaded string
    The time the script was uploaded.
    ContentSizeInBytes int
    Size of the script content.
    Id string
    The provider-assigned unique ID for this managed resource.
    MonitorStatusCountMaps []ScriptMonitorStatusCountMap
    Details of the monitor count per state. Example: { "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
    TimeCreated string
    The time the resource was created, expressed in RFC 3339 timestamp format. Example: 2020-02-12T22:47:12.613Z
    TimeUpdated string
    The time the resource was updated, expressed in RFC 3339 timestamp format. Example: 2020-02-13T22:47:12.613Z
    TimeUploaded string
    The time the script was uploaded.
    contentSizeInBytes Integer
    Size of the script content.
    id String
    The provider-assigned unique ID for this managed resource.
    monitorStatusCountMaps List<ScriptMonitorStatusCountMap>
    Details of the monitor count per state. Example: { "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
    timeCreated String
    The time the resource was created, expressed in RFC 3339 timestamp format. Example: 2020-02-12T22:47:12.613Z
    timeUpdated String
    The time the resource was updated, expressed in RFC 3339 timestamp format. Example: 2020-02-13T22:47:12.613Z
    timeUploaded String
    The time the script was uploaded.
    contentSizeInBytes number
    Size of the script content.
    id string
    The provider-assigned unique ID for this managed resource.
    monitorStatusCountMaps ScriptMonitorStatusCountMap[]
    Details of the monitor count per state. Example: { "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
    timeCreated string
    The time the resource was created, expressed in RFC 3339 timestamp format. Example: 2020-02-12T22:47:12.613Z
    timeUpdated string
    The time the resource was updated, expressed in RFC 3339 timestamp format. Example: 2020-02-13T22:47:12.613Z
    timeUploaded string
    The time the script was uploaded.
    content_size_in_bytes int
    Size of the script content.
    id str
    The provider-assigned unique ID for this managed resource.
    monitor_status_count_maps Sequence[apmsynthetics.ScriptMonitorStatusCountMap]
    Details of the monitor count per state. Example: { "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
    time_created str
    The time the resource was created, expressed in RFC 3339 timestamp format. Example: 2020-02-12T22:47:12.613Z
    time_updated str
    The time the resource was updated, expressed in RFC 3339 timestamp format. Example: 2020-02-13T22:47:12.613Z
    time_uploaded str
    The time the script was uploaded.
    contentSizeInBytes Number
    Size of the script content.
    id String
    The provider-assigned unique ID for this managed resource.
    monitorStatusCountMaps List<Property Map>
    Details of the monitor count per state. Example: { "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
    timeCreated String
    The time the resource was created, expressed in RFC 3339 timestamp format. Example: 2020-02-12T22:47:12.613Z
    timeUpdated String
    The time the resource was updated, expressed in RFC 3339 timestamp format. Example: 2020-02-13T22:47:12.613Z
    timeUploaded String
    The time the script was uploaded.

    Look up Existing Script Resource

    Get an existing Script 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?: ScriptState, opts?: CustomResourceOptions): Script
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            apm_domain_id: Optional[str] = None,
            content: Optional[str] = None,
            content_file_name: Optional[str] = None,
            content_size_in_bytes: Optional[int] = None,
            content_type: Optional[str] = None,
            defined_tags: Optional[Mapping[str, str]] = None,
            display_name: Optional[str] = None,
            freeform_tags: Optional[Mapping[str, str]] = None,
            monitor_status_count_maps: Optional[Sequence[_apmsynthetics.ScriptMonitorStatusCountMapArgs]] = None,
            parameters: Optional[Sequence[_apmsynthetics.ScriptParameterArgs]] = None,
            time_created: Optional[str] = None,
            time_updated: Optional[str] = None,
            time_uploaded: Optional[str] = None) -> Script
    func GetScript(ctx *Context, name string, id IDInput, state *ScriptState, opts ...ResourceOption) (*Script, error)
    public static Script Get(string name, Input<string> id, ScriptState? state, CustomResourceOptions? opts = null)
    public static Script get(String name, Output<String> id, ScriptState 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.
    The following state arguments are supported:
    ApmDomainId string
    (Updatable) The APM domain ID the request is intended for.
    Content string
    (Updatable) The content of the script. It may contain custom-defined tags that can be used for setting dynamic parameters. The format to set dynamic parameters is: <ORAP><ON>param name</ON><OV>param value</OV><OS>isParamValueSecret(true/false)</OS></ORAP>. Param value and isParamValueSecret are optional, the default value for isParamValueSecret is false. Examples: With mandatory param name : <ORAP><ON>param name</ON></ORAP> With parameter name and value : <ORAP><ON>param name</ON><OV>param value</OV></ORAP> Note that the content is valid if it matches the given content type. For example, if the content type is SIDE, then the content should be in Side script format. If the content type is JS, then the content should be in JavaScript format.
    ContentFileName string
    (Updatable) File name of uploaded script content.
    ContentSizeInBytes int
    Size of the script content.
    ContentType string
    (Updatable) Content type of script.
    DefinedTags Dictionary<string, string>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    DisplayName string
    (Updatable) Unique name that can be edited. The name should not contain any confidential information.
    FreeformTags Dictionary<string, string>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    MonitorStatusCountMaps List<ScriptMonitorStatusCountMap>
    Details of the monitor count per state. Example: { "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
    Parameters List<ScriptParameter>
    (Updatable) List of script parameters. Example: [{"paramName": "userid", "paramValue":"testuser", "isSecret": false}]
    TimeCreated string
    The time the resource was created, expressed in RFC 3339 timestamp format. Example: 2020-02-12T22:47:12.613Z
    TimeUpdated string
    The time the resource was updated, expressed in RFC 3339 timestamp format. Example: 2020-02-13T22:47:12.613Z
    TimeUploaded string
    The time the script was uploaded.
    ApmDomainId string
    (Updatable) The APM domain ID the request is intended for.
    Content string
    (Updatable) The content of the script. It may contain custom-defined tags that can be used for setting dynamic parameters. The format to set dynamic parameters is: <ORAP><ON>param name</ON><OV>param value</OV><OS>isParamValueSecret(true/false)</OS></ORAP>. Param value and isParamValueSecret are optional, the default value for isParamValueSecret is false. Examples: With mandatory param name : <ORAP><ON>param name</ON></ORAP> With parameter name and value : <ORAP><ON>param name</ON><OV>param value</OV></ORAP> Note that the content is valid if it matches the given content type. For example, if the content type is SIDE, then the content should be in Side script format. If the content type is JS, then the content should be in JavaScript format.
    ContentFileName string
    (Updatable) File name of uploaded script content.
    ContentSizeInBytes int
    Size of the script content.
    ContentType string
    (Updatable) Content type of script.
    DefinedTags map[string]string
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    DisplayName string
    (Updatable) Unique name that can be edited. The name should not contain any confidential information.
    FreeformTags map[string]string
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    MonitorStatusCountMaps []ScriptMonitorStatusCountMapArgs
    Details of the monitor count per state. Example: { "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
    Parameters []ScriptParameterArgs
    (Updatable) List of script parameters. Example: [{"paramName": "userid", "paramValue":"testuser", "isSecret": false}]
    TimeCreated string
    The time the resource was created, expressed in RFC 3339 timestamp format. Example: 2020-02-12T22:47:12.613Z
    TimeUpdated string
    The time the resource was updated, expressed in RFC 3339 timestamp format. Example: 2020-02-13T22:47:12.613Z
    TimeUploaded string
    The time the script was uploaded.
    apmDomainId String
    (Updatable) The APM domain ID the request is intended for.
    content String
    (Updatable) The content of the script. It may contain custom-defined tags that can be used for setting dynamic parameters. The format to set dynamic parameters is: <ORAP><ON>param name</ON><OV>param value</OV><OS>isParamValueSecret(true/false)</OS></ORAP>. Param value and isParamValueSecret are optional, the default value for isParamValueSecret is false. Examples: With mandatory param name : <ORAP><ON>param name</ON></ORAP> With parameter name and value : <ORAP><ON>param name</ON><OV>param value</OV></ORAP> Note that the content is valid if it matches the given content type. For example, if the content type is SIDE, then the content should be in Side script format. If the content type is JS, then the content should be in JavaScript format.
    contentFileName String
    (Updatable) File name of uploaded script content.
    contentSizeInBytes Integer
    Size of the script content.
    contentType String
    (Updatable) Content type of script.
    definedTags Map<String,String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    displayName String
    (Updatable) Unique name that can be edited. The name should not contain any confidential information.
    freeformTags Map<String,String>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    monitorStatusCountMaps List<ScriptMonitorStatusCountMap>
    Details of the monitor count per state. Example: { "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
    parameters List<ScriptParameter>
    (Updatable) List of script parameters. Example: [{"paramName": "userid", "paramValue":"testuser", "isSecret": false}]
    timeCreated String
    The time the resource was created, expressed in RFC 3339 timestamp format. Example: 2020-02-12T22:47:12.613Z
    timeUpdated String
    The time the resource was updated, expressed in RFC 3339 timestamp format. Example: 2020-02-13T22:47:12.613Z
    timeUploaded String
    The time the script was uploaded.
    apmDomainId string
    (Updatable) The APM domain ID the request is intended for.
    content string
    (Updatable) The content of the script. It may contain custom-defined tags that can be used for setting dynamic parameters. The format to set dynamic parameters is: <ORAP><ON>param name</ON><OV>param value</OV><OS>isParamValueSecret(true/false)</OS></ORAP>. Param value and isParamValueSecret are optional, the default value for isParamValueSecret is false. Examples: With mandatory param name : <ORAP><ON>param name</ON></ORAP> With parameter name and value : <ORAP><ON>param name</ON><OV>param value</OV></ORAP> Note that the content is valid if it matches the given content type. For example, if the content type is SIDE, then the content should be in Side script format. If the content type is JS, then the content should be in JavaScript format.
    contentFileName string
    (Updatable) File name of uploaded script content.
    contentSizeInBytes number
    Size of the script content.
    contentType string
    (Updatable) Content type of script.
    definedTags {[key: string]: string}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    displayName string
    (Updatable) Unique name that can be edited. The name should not contain any confidential information.
    freeformTags {[key: string]: string}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    monitorStatusCountMaps ScriptMonitorStatusCountMap[]
    Details of the monitor count per state. Example: { "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
    parameters ScriptParameter[]
    (Updatable) List of script parameters. Example: [{"paramName": "userid", "paramValue":"testuser", "isSecret": false}]
    timeCreated string
    The time the resource was created, expressed in RFC 3339 timestamp format. Example: 2020-02-12T22:47:12.613Z
    timeUpdated string
    The time the resource was updated, expressed in RFC 3339 timestamp format. Example: 2020-02-13T22:47:12.613Z
    timeUploaded string
    The time the script was uploaded.
    apm_domain_id str
    (Updatable) The APM domain ID the request is intended for.
    content str
    (Updatable) The content of the script. It may contain custom-defined tags that can be used for setting dynamic parameters. The format to set dynamic parameters is: <ORAP><ON>param name</ON><OV>param value</OV><OS>isParamValueSecret(true/false)</OS></ORAP>. Param value and isParamValueSecret are optional, the default value for isParamValueSecret is false. Examples: With mandatory param name : <ORAP><ON>param name</ON></ORAP> With parameter name and value : <ORAP><ON>param name</ON><OV>param value</OV></ORAP> Note that the content is valid if it matches the given content type. For example, if the content type is SIDE, then the content should be in Side script format. If the content type is JS, then the content should be in JavaScript format.
    content_file_name str
    (Updatable) File name of uploaded script content.
    content_size_in_bytes int
    Size of the script content.
    content_type str
    (Updatable) Content type of script.
    defined_tags Mapping[str, str]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    display_name str
    (Updatable) Unique name that can be edited. The name should not contain any confidential information.
    freeform_tags Mapping[str, str]
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    monitor_status_count_maps Sequence[apmsynthetics.ScriptMonitorStatusCountMapArgs]
    Details of the monitor count per state. Example: { "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
    parameters Sequence[apmsynthetics.ScriptParameterArgs]
    (Updatable) List of script parameters. Example: [{"paramName": "userid", "paramValue":"testuser", "isSecret": false}]
    time_created str
    The time the resource was created, expressed in RFC 3339 timestamp format. Example: 2020-02-12T22:47:12.613Z
    time_updated str
    The time the resource was updated, expressed in RFC 3339 timestamp format. Example: 2020-02-13T22:47:12.613Z
    time_uploaded str
    The time the script was uploaded.
    apmDomainId String
    (Updatable) The APM domain ID the request is intended for.
    content String
    (Updatable) The content of the script. It may contain custom-defined tags that can be used for setting dynamic parameters. The format to set dynamic parameters is: <ORAP><ON>param name</ON><OV>param value</OV><OS>isParamValueSecret(true/false)</OS></ORAP>. Param value and isParamValueSecret are optional, the default value for isParamValueSecret is false. Examples: With mandatory param name : <ORAP><ON>param name</ON></ORAP> With parameter name and value : <ORAP><ON>param name</ON><OV>param value</OV></ORAP> Note that the content is valid if it matches the given content type. For example, if the content type is SIDE, then the content should be in Side script format. If the content type is JS, then the content should be in JavaScript format.
    contentFileName String
    (Updatable) File name of uploaded script content.
    contentSizeInBytes Number
    Size of the script content.
    contentType String
    (Updatable) Content type of script.
    definedTags Map<String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    displayName String
    (Updatable) Unique name that can be edited. The name should not contain any confidential information.
    freeformTags Map<String>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    monitorStatusCountMaps List<Property Map>
    Details of the monitor count per state. Example: { "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
    parameters List<Property Map>
    (Updatable) List of script parameters. Example: [{"paramName": "userid", "paramValue":"testuser", "isSecret": false}]
    timeCreated String
    The time the resource was created, expressed in RFC 3339 timestamp format. Example: 2020-02-12T22:47:12.613Z
    timeUpdated String
    The time the resource was updated, expressed in RFC 3339 timestamp format. Example: 2020-02-13T22:47:12.613Z
    timeUploaded String
    The time the script was uploaded.

    Supporting Types

    ScriptMonitorStatusCountMap, ScriptMonitorStatusCountMapArgs

    Disabled int
    Number of disabled monitors using the script.
    Enabled int
    Number of enabled monitors using the script.
    Invalid int
    Number of invalid monitors using the script.
    Total int
    Total number of monitors using the script.
    Disabled int
    Number of disabled monitors using the script.
    Enabled int
    Number of enabled monitors using the script.
    Invalid int
    Number of invalid monitors using the script.
    Total int
    Total number of monitors using the script.
    disabled Integer
    Number of disabled monitors using the script.
    enabled Integer
    Number of enabled monitors using the script.
    invalid Integer
    Number of invalid monitors using the script.
    total Integer
    Total number of monitors using the script.
    disabled number
    Number of disabled monitors using the script.
    enabled number
    Number of enabled monitors using the script.
    invalid number
    Number of invalid monitors using the script.
    total number
    Total number of monitors using the script.
    disabled int
    Number of disabled monitors using the script.
    enabled int
    Number of enabled monitors using the script.
    invalid int
    Number of invalid monitors using the script.
    total int
    Total number of monitors using the script.
    disabled Number
    Number of disabled monitors using the script.
    enabled Number
    Number of enabled monitors using the script.
    invalid Number
    Number of invalid monitors using the script.
    total Number
    Total number of monitors using the script.

    ScriptParameter, ScriptParameterArgs

    ParamName string
    (Updatable) Name of the parameter.
    IsOverwritten bool
    If parameter value is default or overwritten.
    IsSecret bool
    (Updatable) If the parameter value is secret and should be kept confidential, then set isSecret to true.
    ParamValue string

    (Updatable) Value of the parameter.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    ScriptParameters List<ScriptParameterScriptParameter>
    Details of the script parameters, paramName must be from the script content and these details can be used to overwrite the default parameter present in the script content.
    ParamName string
    (Updatable) Name of the parameter.
    IsOverwritten bool
    If parameter value is default or overwritten.
    IsSecret bool
    (Updatable) If the parameter value is secret and should be kept confidential, then set isSecret to true.
    ParamValue string

    (Updatable) Value of the parameter.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    ScriptParameters []ScriptParameterScriptParameter
    Details of the script parameters, paramName must be from the script content and these details can be used to overwrite the default parameter present in the script content.
    paramName String
    (Updatable) Name of the parameter.
    isOverwritten Boolean
    If parameter value is default or overwritten.
    isSecret Boolean
    (Updatable) If the parameter value is secret and should be kept confidential, then set isSecret to true.
    paramValue String

    (Updatable) Value of the parameter.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    scriptParameters List<ScriptParameterScriptParameter>
    Details of the script parameters, paramName must be from the script content and these details can be used to overwrite the default parameter present in the script content.
    paramName string
    (Updatable) Name of the parameter.
    isOverwritten boolean
    If parameter value is default or overwritten.
    isSecret boolean
    (Updatable) If the parameter value is secret and should be kept confidential, then set isSecret to true.
    paramValue string

    (Updatable) Value of the parameter.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    scriptParameters ScriptParameterScriptParameter[]
    Details of the script parameters, paramName must be from the script content and these details can be used to overwrite the default parameter present in the script content.
    param_name str
    (Updatable) Name of the parameter.
    is_overwritten bool
    If parameter value is default or overwritten.
    is_secret bool
    (Updatable) If the parameter value is secret and should be kept confidential, then set isSecret to true.
    param_value str

    (Updatable) Value of the parameter.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    script_parameters Sequence[apmsynthetics.ScriptParameterScriptParameter]
    Details of the script parameters, paramName must be from the script content and these details can be used to overwrite the default parameter present in the script content.
    paramName String
    (Updatable) Name of the parameter.
    isOverwritten Boolean
    If parameter value is default or overwritten.
    isSecret Boolean
    (Updatable) If the parameter value is secret and should be kept confidential, then set isSecret to true.
    paramValue String

    (Updatable) Value of the parameter.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    scriptParameters List<Property Map>
    Details of the script parameters, paramName must be from the script content and these details can be used to overwrite the default parameter present in the script content.

    ScriptParameterScriptParameter, ScriptParameterScriptParameterArgs

    IsSecret bool
    If the parameter value is secret and should be kept confidential, then set isSecret to true.
    ParamName string
    Name of the parameter.
    ParamValue string
    Value of the parameter.
    IsSecret bool
    If the parameter value is secret and should be kept confidential, then set isSecret to true.
    ParamName string
    Name of the parameter.
    ParamValue string
    Value of the parameter.
    isSecret Boolean
    If the parameter value is secret and should be kept confidential, then set isSecret to true.
    paramName String
    Name of the parameter.
    paramValue String
    Value of the parameter.
    isSecret boolean
    If the parameter value is secret and should be kept confidential, then set isSecret to true.
    paramName string
    Name of the parameter.
    paramValue string
    Value of the parameter.
    is_secret bool
    If the parameter value is secret and should be kept confidential, then set isSecret to true.
    param_name str
    Name of the parameter.
    param_value str
    Value of the parameter.
    isSecret Boolean
    If the parameter value is secret and should be kept confidential, then set isSecret to true.
    paramName String
    Name of the parameter.
    paramValue String
    Value of the parameter.

    Import

    Scripts can be imported using the id, e.g.

    $ pulumi import oci:ApmSynthetics/script:Script test_script "scripts/{scriptId}/apmDomainId/{apmDomainId}"
    

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

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi