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

oci.ApmSynthetics.getScript

Explore with Pulumi AI

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

    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:

    ApmDomainId string
    The APM domain ID the request is intended for.
    ScriptId string
    The OCID of the script.
    ApmDomainId string
    The APM domain ID the request is intended for.
    ScriptId string
    The OCID of the script.
    apmDomainId String
    The APM domain ID the request is intended for.
    scriptId String
    The OCID of the script.
    apmDomainId string
    The APM domain ID the request is intended for.
    scriptId string
    The OCID of the script.
    apm_domain_id str
    The APM domain ID the request is intended for.
    script_id str
    The OCID of the script.
    apmDomainId String
    The APM domain ID the request is intended for.
    scriptId 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 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.

    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<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 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 []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 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<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 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 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 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.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 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 oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi