1. Packages
  2. Dynatrace
  3. API Docs
  4. getSyntheticLocation
Dynatrace v0.21.0 published on Sunday, Nov 17, 2024 by Pulumiverse

dynatrace.getSyntheticLocation

Explore with Pulumi AI

dynatrace logo
Dynatrace v0.21.0 published on Sunday, Nov 17, 2024 by Pulumiverse

    The synthetic location data source allows the location ID to be retrieved based off of provided parameters.

    Example Usage

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.dynatrace.DynatraceFunctions;
    import com.pulumi.dynatrace.inputs.GetSyntheticLocationArgs;
    import com.pulumi.dynatrace.HttpMonitor;
    import com.pulumi.dynatrace.HttpMonitorArgs;
    import com.pulumi.dynatrace.inputs.HttpMonitorAnomalyDetectionArgs;
    import com.pulumi.dynatrace.inputs.HttpMonitorScriptArgs;
    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 test = DynatraceFunctions.getSyntheticLocation(GetSyntheticLocationArgs.builder()
                .cloudPlatform("AMAZON_EC2")
                .name("Sydney")
                .type("PUBLIC")
                .build());
    
            var _name_ = new HttpMonitor("#name#", HttpMonitorArgs.builder()
                .anomalyDetections(HttpMonitorAnomalyDetectionArgs.builder()
                    .loadingTimeThresholds(HttpMonitorAnomalyDetectionLoadingTimeThresholdArgs.builder()
                        .enabled(true)
                        .build())
                    .outageHandlings(HttpMonitorAnomalyDetectionOutageHandlingArgs.builder()
                        .globalOutage(true)
                        .localOutage(false)
                        .retryOnError(false)
                        .build())
                    .build())
                .enabled(true)
                .frequency(60)
                .locations(test.applyValue(getSyntheticLocationResult -> getSyntheticLocationResult.id()))
                .script(HttpMonitorScriptArgs.builder()
                    .requests(HttpMonitorScriptRequestArgs.builder()
                        .configuration(HttpMonitorScriptRequestConfigurationArgs.builder()
                            .acceptAnyCertificate(true)
                            .followRedirects(true)
                            .build())
                        .description("google.com")
                        .method("GET")
                        .url("https://www.google.com")
                        .validation(HttpMonitorScriptRequestValidationArgs.builder()
                            .rule(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                            .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      '#name#':
        type: dynatrace:HttpMonitor
        properties:
          anomalyDetections:
            - loadingTimeThresholds:
                - enabled: true
              outageHandlings:
                - globalOutage: true
                  localOutage: false
                  retryOnError: false
          enabled: true
          frequency: 60
          locations:
            - ${test.id}
          script:
            requests:
              - configuration:
                  acceptAnyCertificate: true
                  followRedirects: true
                description: google.com
                method: GET
                url: https://www.google.com
                validation:
                  rule:
                    - passIfFound: false
                      type: httpStatusesList
                      value: '>=400'
    variables:
      test:
        fn::invoke:
          Function: dynatrace:getSyntheticLocation
          Arguments:
            cloudPlatform: AMAZON_EC2
            name: Sydney
            type: PUBLIC
    

    Using getSyntheticLocation

    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 getSyntheticLocation(args: GetSyntheticLocationArgs, opts?: InvokeOptions): Promise<GetSyntheticLocationResult>
    function getSyntheticLocationOutput(args: GetSyntheticLocationOutputArgs, opts?: InvokeOptions): Output<GetSyntheticLocationResult>
    def get_synthetic_location(cloud_platform: Optional[str] = None,
                               entity_id: Optional[str] = None,
                               ips: Optional[Sequence[str]] = None,
                               name: Optional[str] = None,
                               stage: Optional[str] = None,
                               status: Optional[str] = None,
                               type: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetSyntheticLocationResult
    def get_synthetic_location_output(cloud_platform: Optional[pulumi.Input[str]] = None,
                               entity_id: Optional[pulumi.Input[str]] = None,
                               ips: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                               name: Optional[pulumi.Input[str]] = None,
                               stage: Optional[pulumi.Input[str]] = None,
                               status: Optional[pulumi.Input[str]] = None,
                               type: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetSyntheticLocationResult]
    func LookupSyntheticLocation(ctx *Context, args *LookupSyntheticLocationArgs, opts ...InvokeOption) (*LookupSyntheticLocationResult, error)
    func LookupSyntheticLocationOutput(ctx *Context, args *LookupSyntheticLocationOutputArgs, opts ...InvokeOption) LookupSyntheticLocationResultOutput

    > Note: This function is named LookupSyntheticLocation in the Go SDK.

    public static class GetSyntheticLocation 
    {
        public static Task<GetSyntheticLocationResult> InvokeAsync(GetSyntheticLocationArgs args, InvokeOptions? opts = null)
        public static Output<GetSyntheticLocationResult> Invoke(GetSyntheticLocationInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSyntheticLocationResult> getSyntheticLocation(GetSyntheticLocationArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: dynatrace:index/getSyntheticLocation:getSyntheticLocation
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CloudPlatform string
    The cloud provider where the location is hosted.
    EntityId string
    Ips List<string>
    Name string
    Stage string
    Status string
    Type string
    CloudPlatform string
    The cloud provider where the location is hosted.
    EntityId string
    Ips []string
    Name string
    Stage string
    Status string
    Type string
    cloudPlatform String
    The cloud provider where the location is hosted.
    entityId String
    ips List<String>
    name String
    stage String
    status String
    type String
    cloudPlatform string
    The cloud provider where the location is hosted.
    entityId string
    ips string[]
    name string
    stage string
    status string
    type string
    cloud_platform str
    The cloud provider where the location is hosted.
    entity_id str
    ips Sequence[str]
    name str
    stage str
    status str
    type str
    cloudPlatform String
    The cloud provider where the location is hosted.
    entityId String
    ips List<String>
    name String
    stage String
    status String
    type String

    getSyntheticLocation Result

    The following output properties are available:

    CloudPlatform string
    The cloud provider where the location is hosted.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ips List<string>
    Stage string
    Status string
    EntityId string
    Name string
    Type string
    CloudPlatform string
    The cloud provider where the location is hosted.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ips []string
    Stage string
    Status string
    EntityId string
    Name string
    Type string
    cloudPlatform String
    The cloud provider where the location is hosted.
    id String
    The provider-assigned unique ID for this managed resource.
    ips List<String>
    stage String
    status String
    entityId String
    name String
    type String
    cloudPlatform string
    The cloud provider where the location is hosted.
    id string
    The provider-assigned unique ID for this managed resource.
    ips string[]
    stage string
    status string
    entityId string
    name string
    type string
    cloud_platform str
    The cloud provider where the location is hosted.
    id str
    The provider-assigned unique ID for this managed resource.
    ips Sequence[str]
    stage str
    status str
    entity_id str
    name str
    type str
    cloudPlatform String
    The cloud provider where the location is hosted.
    id String
    The provider-assigned unique ID for this managed resource.
    ips List<String>
    stage String
    status String
    entityId String
    name String
    type String

    Package Details

    Repository
    dynatrace pulumiverse/pulumi-dynatrace
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the dynatrace Terraform Provider.
    dynatrace logo
    Dynatrace v0.21.0 published on Sunday, Nov 17, 2024 by Pulumiverse