1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. ApmSynthetics
  5. getScript
Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi

oci.ApmSynthetics.getScript

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi

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,
});
Copy
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"])
Copy
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
	})
}
Copy
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,
    });

});
Copy
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());

    }
}
Copy
variables:
  testScript:
    fn::invoke:
      function: oci:ApmSynthetics:getScript
      arguments:
        apmDomainId: ${testApmDomain.id}
        scriptId: ${testScriptOciApmSyntheticsScript.id}
Copy

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>
Copy
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]
Copy
func GetScript(ctx *Context, args *GetScriptArgs, opts ...InvokeOption) (*GetScriptResult, error)
func GetScriptOutput(ctx *Context, args *GetScriptOutputArgs, opts ...InvokeOption) GetScriptResultOutput
Copy

> Note: This function is named GetScript 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)
}
Copy
public static CompletableFuture<GetScriptResult> getScript(GetScriptArgs args, InvokeOptions options)
public static Output<GetScriptResult> getScript(GetScriptArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:ApmSynthetics/getScript:getScript
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ApmDomainId This property is required. string
The APM domain ID the request is intended for.
ScriptId This property is required. string
The OCID of the script.
ApmDomainId This property is required. string
The APM domain ID the request is intended for.
ScriptId This property is required. string
The OCID of the script.
apmDomainId This property is required. String
The APM domain ID the request is intended for.
scriptId This property is required. String
The OCID of the script.
apmDomainId This property is required. string
The APM domain ID the request is intended for.
scriptId This property is required. string
The OCID of the script.
apm_domain_id This property is required. str
The APM domain ID the request is intended for.
script_id This property is required. str
The OCID of the script.
apmDomainId This property is required. String
The APM domain ID the request is intended for.
scriptId This property is required. String
The OCID of the script.

getScript Result

The following output properties are available:

ApmDomainId string
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.
ContentFileName string
File name of the uploaded script content.
ContentSizeInBytes int
Size of the script content.
ContentType string
Content type of the script.
DefinedTags 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.
FreeformTags 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.
MonitorStatusCountMaps List<GetScriptMonitorStatusCountMap>
Details of the monitor count per state. Example: { "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
Parameters List<GetScriptParameter>
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.
ApmDomainId string
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.
ContentFileName string
File name of the uploaded script content.
ContentSizeInBytes int
Size of the script content.
ContentType string
Content type of the script.
DefinedTags 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.
FreeformTags 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.
MonitorStatusCountMaps []GetScriptMonitorStatusCountMap
Details of the monitor count per state. Example: { "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
Parameters []GetScriptParameter
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.
apmDomainId String
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.
contentFileName String
File name of the uploaded script content.
contentSizeInBytes Integer
Size of the script content.
contentType String
Content type of the script.
definedTags 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.
freeformTags 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.
monitorStatusCountMaps List<GetScriptMonitorStatusCountMap>
Details of the monitor count per state. Example: { "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
parameters List<GetScriptParameter>
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.
apmDomainId string
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.
contentFileName string
File name of the uploaded script content.
contentSizeInBytes number
Size of the script content.
contentType string
Content type of the script.
definedTags {[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.
freeformTags {[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.
monitorStatusCountMaps GetScriptMonitorStatusCountMap[]
Details of the monitor count per state. Example: { "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
parameters GetScriptParameter[]
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_id str
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_name str
File name of the uploaded script content.
content_size_in_bytes int
Size of the script content.
content_type str
Content type of the script.
defined_tags 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.
freeform_tags 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_count_maps Sequence[apmsynthetics.GetScriptMonitorStatusCountMap]
Details of the monitor count per state. Example: { "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
parameters Sequence[apmsynthetics.GetScriptParameter]
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.
apmDomainId String
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.
contentFileName String
File name of the uploaded script content.
contentSizeInBytes Number
Size of the script content.
contentType String
Content type of the script.
definedTags 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.
freeformTags 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.
monitorStatusCountMaps List<Property Map>
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

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

GetScriptParameter

IsOverwritten This property is required. bool
If parameter value is default or overwritten.
IsSecret This property is required. bool
If the parameter value is secret and should be kept confidential, then set isSecret to true.
ParamName This property is required. string
Name of the parameter.
ParamValue This property is required. string
Value of the parameter.
ScriptParameters This property is required. List<GetScriptParameterScriptParameter>
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 This property is required. bool
If parameter value is default or overwritten.
IsSecret This property is required. bool
If the parameter value is secret and should be kept confidential, then set isSecret to true.
ParamName This property is required. string
Name of the parameter.
ParamValue This property is required. string
Value of the parameter.
ScriptParameters This property is required. []GetScriptParameterScriptParameter
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 This property is required. Boolean
If parameter value is default or overwritten.
isSecret This property is required. Boolean
If the parameter value is secret and should be kept confidential, then set isSecret to true.
paramName This property is required. String
Name of the parameter.
paramValue This property is required. String
Value of the parameter.
scriptParameters This property is required. List<GetScriptParameterScriptParameter>
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 This property is required. boolean
If parameter value is default or overwritten.
isSecret This property is required. boolean
If the parameter value is secret and should be kept confidential, then set isSecret to true.
paramName This property is required. string
Name of the parameter.
paramValue This property is required. string
Value of the parameter.
scriptParameters This property is required. GetScriptParameterScriptParameter[]
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 This property is required. bool
If parameter value is default or overwritten.
is_secret This property is required. bool
If the parameter value is secret and should be kept confidential, then set isSecret to true.
param_name This property is required. str
Name of the parameter.
param_value This property is required. str
Value of the parameter.
script_parameters This property is required. Sequence[apmsynthetics.GetScriptParameterScriptParameter]
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 This property is required. Boolean
If parameter value is default or overwritten.
isSecret This property is required. Boolean
If the parameter value is secret and should be kept confidential, then set isSecret to true.
paramName This property is required. String
Name of the parameter.
paramValue This property is required. String
Value of the parameter.
scriptParameters This property is required. 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 This property is required. bool
If the parameter value is secret and should be kept confidential, then set isSecret to true.
ParamName This property is required. string
Name of the parameter.
ParamValue This property is required. string
Value of the parameter.
IsSecret This property is required. bool
If the parameter value is secret and should be kept confidential, then set isSecret to true.
ParamName This property is required. string
Name of the parameter.
ParamValue This property is required. string
Value of the parameter.
isSecret This property is required. Boolean
If the parameter value is secret and should be kept confidential, then set isSecret to true.
paramName This property is required. String
Name of the parameter.
paramValue This property is required. String
Value of the parameter.
isSecret This property is required. boolean
If the parameter value is secret and should be kept confidential, then set isSecret to true.
paramName This property is required. string
Name of the parameter.
paramValue This property is required. string
Value of the parameter.
is_secret This property is required. bool
If the parameter value is secret and should be kept confidential, then set isSecret to true.
param_name This property is required. str
Name of the parameter.
param_value This property is required. str
Value of the parameter.
isSecret This property is required. Boolean
If the parameter value is secret and should be kept confidential, then set isSecret to true.
paramName This property is required. String
Name of the parameter.
paramValue This property is required. String
Value of the parameter.

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi