Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi
oci.ApmSynthetics.getScript
Explore with Pulumi AI
This data source provides details about a specific Script resource in Oracle Cloud Infrastructure 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 GetScript(ctx *Context, args *GetScriptArgs, opts ...InvokeOption) (*GetScriptResult, error)
func GetScriptOutput(ctx *Context, args *GetScriptOutputArgs, opts ...InvokeOption) GetScriptResultOutput
> 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)
}
public static CompletableFuture<GetScriptResult> getScript(GetScriptArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:ApmSynthetics/getScript:getScript
arguments:
# arguments dictionary
The following arguments are supported:
- Apm
Domain stringId - The APM domain ID the request is intended for.
- Script
Id string - The OCID of the script.
- Apm
Domain stringId - The APM domain ID the request is intended for.
- Script
Id string - The OCID of the script.
- apm
Domain StringId - The APM domain ID the request is intended for.
- script
Id String - The OCID of the script.
- apm
Domain stringId - The APM domain ID the request is intended for.
- script
Id 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.
- apm
Domain StringId - The APM domain ID the request is intended for.
- script
Id String - The OCID of the script.
getScript Result
The following output properties are available:
- Apm
Domain 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. - Content
File stringName - File name of the uploaded script content.
- Content
Size intIn Bytes - Size of the script content.
- Content
Type 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"}
- Display
Name 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.
- Monitor
Status 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<Get
Script Parameter> - List of script parameters. Example:
[{"scriptParameter": {"paramName": "userid", "paramValue":"testuser", "isSecret": false}, "isOverwritten": false}]
- Script
Id string - Time
Created string - The time the resource was created, expressed in RFC 3339 timestamp format. Example:
2020-02-12T22:47:12.613Z
- Time
Updated string - The time the resource was updated, expressed in RFC 3339 timestamp format. Example:
2020-02-13T22:47:12.613Z
- Time
Uploaded string - The time the script was uploaded.
- Apm
Domain 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. - Content
File stringName - File name of the uploaded script content.
- Content
Size intIn Bytes - Size of the script content.
- Content
Type 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"}
- Display
Name 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.
- Monitor
Status []GetCount Maps Script Monitor Status Count Map - Details of the monitor count per state. Example:
{ "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
- Parameters
[]Get
Script Parameter - List of script parameters. Example:
[{"scriptParameter": {"paramName": "userid", "paramValue":"testuser", "isSecret": false}, "isOverwritten": false}]
- Script
Id string - Time
Created string - The time the resource was created, expressed in RFC 3339 timestamp format. Example:
2020-02-12T22:47:12.613Z
- Time
Updated string - The time the resource was updated, expressed in RFC 3339 timestamp format. Example:
2020-02-13T22:47:12.613Z
- Time
Uploaded string - The time the script was uploaded.
- apm
Domain 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. - content
File StringName - File name of the uploaded script content.
- content
Size IntegerIn Bytes - Size of the script content.
- content
Type 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"}
- display
Name 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.
- monitor
Status 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<Get
Script Parameter> - List of script parameters. Example:
[{"scriptParameter": {"paramName": "userid", "paramValue":"testuser", "isSecret": false}, "isOverwritten": false}]
- script
Id String - time
Created String - The time the resource was created, expressed in RFC 3339 timestamp format. Example:
2020-02-12T22:47:12.613Z
- time
Updated String - The time the resource was updated, expressed in RFC 3339 timestamp format. Example:
2020-02-13T22:47:12.613Z
- time
Uploaded String - The time the script was uploaded.
- apm
Domain 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. - content
File stringName - File name of the uploaded script content.
- content
Size numberIn Bytes - Size of the script content.
- content
Type 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"}
- display
Name 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.
- monitor
Status GetCount Maps Script Monitor Status Count Map[] - Details of the monitor count per state. Example:
{ "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
- parameters
Get
Script Parameter[] - List of script parameters. Example:
[{"scriptParameter": {"paramName": "userid", "paramValue":"testuser", "isSecret": false}, "isOverwritten": false}]
- script
Id string - time
Created string - The time the resource was created, expressed in RFC 3339 timestamp format. Example:
2020-02-12T22:47:12.613Z
- time
Updated string - The time the resource was updated, expressed in RFC 3339 timestamp format. Example:
2020-02-13T22:47:12.613Z
- time
Uploaded 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[apmsynthetics.count_ maps Get Script Monitor Status Count Map] - Details of the monitor count per state. Example:
{ "total" : 5, "enabled" : 3 , "disabled" : 2, "invalid" : 0 }
- parameters
Sequence[apmsynthetics.
Get Script 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.
- apm
Domain 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. - content
File StringName - File name of the uploaded script content.
- content
Size NumberIn Bytes - Size of the script content.
- content
Type 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"}
- display
Name 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.
- monitor
Status 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}]
- script
Id String - time
Created String - The time the resource was created, expressed in RFC 3339 timestamp format. Example:
2020-02-12T22:47:12.613Z
- time
Updated String - The time the resource was updated, expressed in RFC 3339 timestamp format. Example:
2020-02-13T22:47:12.613Z
- time
Uploaded String - The time the script was uploaded.
Supporting Types
GetScriptMonitorStatusCountMap
GetScriptParameter
- 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 string - Name of the parameter.
- Param
Value string - Value of the parameter.
- Script
Parameters 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.
- 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 string - Name of the parameter.
- Param
Value string - Value of the parameter.
- Script
Parameters []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 Boolean - If parameter value is default or overwritten.
- is
Secret Boolean - If the parameter value is secret and should be kept confidential, then set isSecret to true.
- param
Name String - Name of the parameter.
- param
Value String - Value of the parameter.
- script
Parameters 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.
- is
Overwritten boolean - If parameter value is default or overwritten.
- is
Secret boolean - If the parameter value is secret and should be kept confidential, then set isSecret to true.
- param
Name string - Name of the parameter.
- param
Value string - Value of the parameter.
- script
Parameters 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[apmsynthetics.Get Script 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 Boolean - If parameter value is default or overwritten.
- is
Secret Boolean - If the parameter value is secret and should be kept confidential, then set isSecret to true.
- param
Name String - Name of the parameter.
- param
Value String - Value of the parameter.
- script
Parameters 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
- Is
Secret bool - If the parameter value is secret and should be kept confidential, then set isSecret to true.
- Param
Name string - Name of the parameter.
- Param
Value 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 string - Name of the parameter.
- Param
Value string - Value of the parameter.
- is
Secret Boolean - If the parameter value is secret and should be kept confidential, then set isSecret to true.
- param
Name String - Name of the parameter.
- param
Value String - Value of the parameter.
- is
Secret boolean - If the parameter value is secret and should be kept confidential, then set isSecret to true.
- param
Name string - Name of the parameter.
- param
Value 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.
- is
Secret Boolean - If the parameter value is secret and should be kept confidential, then set isSecret to true.
- param
Name String - Name of the parameter.
- param
Value 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.