Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.ApmSynthetics.getScript
Explore with Pulumi AI
This data source provides details about a specific Script resource in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service).
Gets the configuration of the script identified by the OCID.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testScript = oci.ApmSynthetics.getScript({
    apmDomainId: testApmDomain.id,
    scriptId: testScriptOciApmSyntheticsScript.id,
});
import pulumi
import pulumi_oci as oci
test_script = oci.ApmSynthetics.get_script(apm_domain_id=test_apm_domain["id"],
    script_id=test_script_oci_apm_synthetics_script["id"])
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.GetScript(ctx, &apmsynthetics.GetScriptArgs{
			ApmDomainId: testApmDomain.Id,
			ScriptId:    testScriptOciApmSyntheticsScript.Id,
		}, nil)
		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 = Oci.ApmSynthetics.GetScript.Invoke(new()
    {
        ApmDomainId = testApmDomain.Id,
        ScriptId = testScriptOciApmSyntheticsScript.Id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.ApmSynthetics.ApmSyntheticsFunctions;
import com.pulumi.oci.ApmSynthetics.inputs.GetScriptArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var testScript = ApmSyntheticsFunctions.getScript(GetScriptArgs.builder()
            .apmDomainId(testApmDomain.id())
            .scriptId(testScriptOciApmSyntheticsScript.id())
            .build());
    }
}
variables:
  testScript:
    fn::invoke:
      function: oci:ApmSynthetics:getScript
      arguments:
        apmDomainId: ${testApmDomain.id}
        scriptId: ${testScriptOciApmSyntheticsScript.id}
Using getScript
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getScript(args: GetScriptArgs, opts?: InvokeOptions): Promise<GetScriptResult>
function getScriptOutput(args: GetScriptOutputArgs, opts?: InvokeOptions): Output<GetScriptResult>def get_script(apm_domain_id: Optional[str] = None,
               script_id: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetScriptResult
def get_script_output(apm_domain_id: Optional[pulumi.Input[str]] = None,
               script_id: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetScriptResult]func LookupScript(ctx *Context, args *LookupScriptArgs, opts ...InvokeOption) (*LookupScriptResult, error)
func LookupScriptOutput(ctx *Context, args *LookupScriptOutputArgs, opts ...InvokeOption) LookupScriptResultOutput> Note: This function is named LookupScript in the Go SDK.
public static class GetScript 
{
    public static Task<GetScriptResult> InvokeAsync(GetScriptArgs args, InvokeOptions? opts = null)
    public static Output<GetScriptResult> Invoke(GetScriptInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetScriptResult> getScript(GetScriptArgs args, InvokeOptions options)
public static Output<GetScriptResult> getScript(GetScriptArgs args, InvokeOptions options)
fn::invoke:
  function: oci:ApmSynthetics/getScript:getScript
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ApmDomain stringId 
- The APM domain ID the request is intended for.
- ScriptId string
- The OCID of the script.
- ApmDomain stringId 
- The APM domain ID the request is intended for.
- ScriptId string
- The OCID of the script.
- apmDomain StringId 
- The APM domain ID the request is intended for.
- scriptId String
- The OCID of the script.
- apmDomain stringId 
- The APM domain ID the request is intended for.
- scriptId string
- The OCID of the script.
- apm_domain_ strid 
- The APM domain ID the request is intended for.
- script_id str
- The OCID of the script.
- apmDomain StringId 
- The APM domain ID the request is intended for.
- scriptId String
- The OCID of the script.
getScript Result
The following output properties are available:
- ApmDomain stringId 
- Content string
- 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.
- ContentFile stringName 
- File name of the uploaded script content.
- ContentSize intIn Bytes 
- Size of the script content.
- ContentType string
- Content type of the script.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- DisplayName string
- Unique name that can be edited. The name should not contain any confidential information.
- Dictionary<string, string>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- Id string
- The OCID of the script. scriptId is mandatory for creation of SCRIPTED_BROWSER and SCRIPTED_REST monitor types. For other monitor types, it should be set to null.
- MonitorStatus List<GetCount Maps Script Monitor Status Count Map> 
- Details of the monitor count per state. Example: { "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
- Parameters
List<GetScript Parameter> 
- List of script parameters. Example: [{"scriptParameter": {"paramName": "userid", "paramValue":"testuser", "isSecret": false}, "isOverwritten": false}]
- ScriptId string
- 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.
- ApmDomain stringId 
- Content string
- 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.
- ContentFile stringName 
- File name of the uploaded script content.
- ContentSize intIn Bytes 
- Size of the script content.
- ContentType string
- Content type of the script.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- DisplayName string
- Unique name that can be edited. The name should not contain any confidential information.
- map[string]string
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- Id string
- The OCID of the script. scriptId is mandatory for creation of SCRIPTED_BROWSER and SCRIPTED_REST monitor types. For other monitor types, it should be set to null.
- MonitorStatus []GetCount Maps Script Monitor Status Count Map 
- Details of the monitor count per state. Example: { "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
- Parameters
[]GetScript Parameter 
- List of script parameters. Example: [{"scriptParameter": {"paramName": "userid", "paramValue":"testuser", "isSecret": false}, "isOverwritten": false}]
- ScriptId string
- 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.
- apmDomain StringId 
- content String
- 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.
- contentFile StringName 
- File name of the uploaded script content.
- contentSize IntegerIn Bytes 
- Size of the script content.
- contentType String
- Content type of the script.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- displayName String
- Unique name that can be edited. The name should not contain any confidential information.
- Map<String,String>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- id String
- The OCID of the script. scriptId is mandatory for creation of SCRIPTED_BROWSER and SCRIPTED_REST monitor types. For other monitor types, it should be set to null.
- monitorStatus List<GetCount Maps Script Monitor Status Count Map> 
- Details of the monitor count per state. Example: { "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
- parameters
List<GetScript Parameter> 
- List of script parameters. Example: [{"scriptParameter": {"paramName": "userid", "paramValue":"testuser", "isSecret": false}, "isOverwritten": false}]
- scriptId String
- 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.
- apmDomain stringId 
- content string
- 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.
- contentFile stringName 
- File name of the uploaded script content.
- contentSize numberIn Bytes 
- Size of the script content.
- contentType string
- Content type of the script.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- displayName string
- Unique name that can be edited. The name should not contain any confidential information.
- {[key: string]: string}
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- id string
- The OCID of the script. scriptId is mandatory for creation of SCRIPTED_BROWSER and SCRIPTED_REST monitor types. For other monitor types, it should be set to null.
- monitorStatus GetCount Maps Script Monitor Status Count Map[] 
- Details of the monitor count per state. Example: { "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
- parameters
GetScript Parameter[] 
- List of script parameters. Example: [{"scriptParameter": {"paramName": "userid", "paramValue":"testuser", "isSecret": false}, "isOverwritten": false}]
- scriptId string
- 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_ strid 
- content str
- 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_ strname 
- File name of the uploaded script content.
- content_size_ intin_ bytes 
- Size of the script content.
- content_type str
- Content type of the script.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- display_name str
- Unique name that can be edited. The name should not contain any confidential information.
- Mapping[str, str]
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- id str
- The OCID of the script. scriptId is mandatory for creation of SCRIPTED_BROWSER and SCRIPTED_REST monitor types. For other monitor types, it should be set to null.
- monitor_status_ Sequence[Getcount_ maps Script Monitor Status Count Map] 
- Details of the monitor count per state. Example: { "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
- parameters
Sequence[GetScript Parameter] 
- List of script parameters. Example: [{"scriptParameter": {"paramName": "userid", "paramValue":"testuser", "isSecret": false}, "isOverwritten": false}]
- script_id str
- 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.
- apmDomain StringId 
- content String
- 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.
- contentFile StringName 
- File name of the uploaded script content.
- contentSize NumberIn Bytes 
- Size of the script content.
- contentType String
- Content type of the script.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- displayName String
- Unique name that can be edited. The name should not contain any confidential information.
- Map<String>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- id String
- The OCID of the script. scriptId is mandatory for creation of SCRIPTED_BROWSER and SCRIPTED_REST monitor types. For other monitor types, it should be set to null.
- monitorStatus List<Property Map>Count Maps 
- Details of the monitor count per state. Example: { "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
- parameters List<Property Map>
- List of script parameters. Example: [{"scriptParameter": {"paramName": "userid", "paramValue":"testuser", "isSecret": false}, "isOverwritten": false}]
- scriptId String
- 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
GetScriptMonitorStatusCountMap     
GetScriptParameter  
- IsOverwritten bool
- If parameter value is default or overwritten.
- 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.
- ScriptParameters List<GetScript Parameter Script Parameter> 
- 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.
- IsOverwritten bool
- If parameter value is default or overwritten.
- 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.
- ScriptParameters []GetScript Parameter Script Parameter 
- 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.
- isOverwritten Boolean
- If parameter value is default or overwritten.
- 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.
- scriptParameters List<GetScript Parameter Script Parameter> 
- 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.
- isOverwritten boolean
- If parameter value is default or overwritten.
- 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.
- scriptParameters GetScript Parameter Script Parameter[] 
- 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.
- is_overwritten bool
- If parameter value is default or overwritten.
- 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.
- script_parameters Sequence[GetScript Parameter Script Parameter] 
- 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.
- isOverwritten Boolean
- If parameter value is default or overwritten.
- 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.
- 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.
GetScriptParameterScriptParameter    
- 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.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.