azure-native.elastic.OpenAI
Explore with Pulumi AI
Capture properties of Open AI resource Integration. Azure REST API version: 2024-03-01.
Other available API versions: 2024-01-01-preview, 2024-05-01-preview, 2024-06-15-preview, 2024-10-01-preview.
Example Usage
OpenAI_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var openAI = new AzureNative.Elastic.OpenAI("openAI", new()
{
IntegrationName = "default",
MonitorName = "myMonitor",
ResourceGroupName = "myResourceGroup",
});
});
package main
import (
elastic "github.com/pulumi/pulumi-azure-native-sdk/elastic/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := elastic.NewOpenAI(ctx, "openAI", &elastic.OpenAIArgs{
IntegrationName: pulumi.String("default"),
MonitorName: pulumi.String("myMonitor"),
ResourceGroupName: pulumi.String("myResourceGroup"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.elastic.OpenAI;
import com.pulumi.azurenative.elastic.OpenAIArgs;
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) {
var openAI = new OpenAI("openAI", OpenAIArgs.builder()
.integrationName("default")
.monitorName("myMonitor")
.resourceGroupName("myResourceGroup")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
open_ai = azure_native.elastic.OpenAI("openAI",
integration_name="default",
monitor_name="myMonitor",
resource_group_name="myResourceGroup")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const openAI = new azure_native.elastic.OpenAI("openAI", {
integrationName: "default",
monitorName: "myMonitor",
resourceGroupName: "myResourceGroup",
});
resources:
openAI:
type: azure-native:elastic:OpenAI
properties:
integrationName: default
monitorName: myMonitor
resourceGroupName: myResourceGroup
Create OpenAI Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new OpenAI(name: string, args: OpenAIArgs, opts?: CustomResourceOptions);
@overload
def OpenAI(resource_name: str,
args: OpenAIArgs,
opts: Optional[ResourceOptions] = None)
@overload
def OpenAI(resource_name: str,
opts: Optional[ResourceOptions] = None,
monitor_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
integration_name: Optional[str] = None,
properties: Optional[OpenAIIntegrationPropertiesArgs] = None)
func NewOpenAI(ctx *Context, name string, args OpenAIArgs, opts ...ResourceOption) (*OpenAI, error)
public OpenAI(string name, OpenAIArgs args, CustomResourceOptions? opts = null)
public OpenAI(String name, OpenAIArgs args)
public OpenAI(String name, OpenAIArgs args, CustomResourceOptions options)
type: azure-native:elastic:OpenAI
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args OpenAIArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args OpenAIArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args OpenAIArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OpenAIArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args OpenAIArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var openAIResource = new AzureNative.Elastic.OpenAI("openAIResource", new()
{
MonitorName = "string",
ResourceGroupName = "string",
IntegrationName = "string",
Properties = new AzureNative.Elastic.Inputs.OpenAIIntegrationPropertiesArgs
{
Key = "string",
OpenAIResourceEndpoint = "string",
OpenAIResourceId = "string",
},
});
example, err := elastic.NewOpenAI(ctx, "openAIResource", &elastic.OpenAIArgs{
MonitorName: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
IntegrationName: pulumi.String("string"),
Properties: &elastic.OpenAIIntegrationPropertiesArgs{
Key: pulumi.String("string"),
OpenAIResourceEndpoint: pulumi.String("string"),
OpenAIResourceId: pulumi.String("string"),
},
})
var openAIResource = new OpenAI("openAIResource", OpenAIArgs.builder()
.monitorName("string")
.resourceGroupName("string")
.integrationName("string")
.properties(OpenAIIntegrationPropertiesArgs.builder()
.key("string")
.openAIResourceEndpoint("string")
.openAIResourceId("string")
.build())
.build());
open_ai_resource = azure_native.elastic.OpenAI("openAIResource",
monitor_name="string",
resource_group_name="string",
integration_name="string",
properties={
"key": "string",
"open_ai_resource_endpoint": "string",
"open_ai_resource_id": "string",
})
const openAIResource = new azure_native.elastic.OpenAI("openAIResource", {
monitorName: "string",
resourceGroupName: "string",
integrationName: "string",
properties: {
key: "string",
openAIResourceEndpoint: "string",
openAIResourceId: "string",
},
});
type: azure-native:elastic:OpenAI
properties:
integrationName: string
monitorName: string
properties:
key: string
openAIResourceEndpoint: string
openAIResourceId: string
resourceGroupName: string
OpenAI Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The OpenAI resource accepts the following input properties:
- Monitor
Name string - Monitor resource name
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Integration
Name string - OpenAI Integration name
- Properties
Pulumi.
Azure Native. Elastic. Inputs. Open AIIntegration Properties - Open AI Integration details.
- Monitor
Name string - Monitor resource name
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Integration
Name string - OpenAI Integration name
- Properties
Open
AIIntegration Properties Args - Open AI Integration details.
- monitor
Name String - Monitor resource name
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- integration
Name String - OpenAI Integration name
- properties
Open
AIIntegration Properties - Open AI Integration details.
- monitor
Name string - Monitor resource name
- resource
Group stringName - The name of the resource group. The name is case insensitive.
- integration
Name string - OpenAI Integration name
- properties
Open
AIIntegration Properties - Open AI Integration details.
- monitor_
name str - Monitor resource name
- resource_
group_ strname - The name of the resource group. The name is case insensitive.
- integration_
name str - OpenAI Integration name
- properties
Open
AIIntegration Properties Args - Open AI Integration details.
- monitor
Name String - Monitor resource name
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- integration
Name String - OpenAI Integration name
- properties Property Map
- Open AI Integration details.
Outputs
All input properties are implicitly available as output properties. Additionally, the OpenAI resource produces the following output properties:
Supporting Types
OpenAIIntegrationProperties, OpenAIIntegrationPropertiesArgs
- Key string
- Value of API key for Open AI resource
- Open
AIResource stringEndpoint - The API endpoint for Open AI resource
- Open
AIResource stringId - The resource name of Open AI resource
- Key string
- Value of API key for Open AI resource
- Open
AIResource stringEndpoint - The API endpoint for Open AI resource
- Open
AIResource stringId - The resource name of Open AI resource
- key String
- Value of API key for Open AI resource
- open
AIResource StringEndpoint - The API endpoint for Open AI resource
- open
AIResource StringId - The resource name of Open AI resource
- key string
- Value of API key for Open AI resource
- open
AIResource stringEndpoint - The API endpoint for Open AI resource
- open
AIResource stringId - The resource name of Open AI resource
- key str
- Value of API key for Open AI resource
- open_
ai_ strresource_ endpoint - The API endpoint for Open AI resource
- open_
ai_ strresource_ id - The resource name of Open AI resource
- key String
- Value of API key for Open AI resource
- open
AIResource StringEndpoint - The API endpoint for Open AI resource
- open
AIResource StringId - The resource name of Open AI resource
OpenAIIntegrationPropertiesResponse, OpenAIIntegrationPropertiesResponseArgs
- Last
Refresh stringAt - Last Update Timestamp for key updation
- Key string
- Value of API key for Open AI resource
- Open
AIResource stringEndpoint - The API endpoint for Open AI resource
- Open
AIResource stringId - The resource name of Open AI resource
- Last
Refresh stringAt - Last Update Timestamp for key updation
- Key string
- Value of API key for Open AI resource
- Open
AIResource stringEndpoint - The API endpoint for Open AI resource
- Open
AIResource stringId - The resource name of Open AI resource
- last
Refresh StringAt - Last Update Timestamp for key updation
- key String
- Value of API key for Open AI resource
- open
AIResource StringEndpoint - The API endpoint for Open AI resource
- open
AIResource StringId - The resource name of Open AI resource
- last
Refresh stringAt - Last Update Timestamp for key updation
- key string
- Value of API key for Open AI resource
- open
AIResource stringEndpoint - The API endpoint for Open AI resource
- open
AIResource stringId - The resource name of Open AI resource
- last_
refresh_ strat - Last Update Timestamp for key updation
- key str
- Value of API key for Open AI resource
- open_
ai_ strresource_ endpoint - The API endpoint for Open AI resource
- open_
ai_ strresource_ id - The resource name of Open AI resource
- last
Refresh StringAt - Last Update Timestamp for key updation
- key String
- Value of API key for Open AI resource
- open
AIResource StringEndpoint - The API endpoint for Open AI resource
- open
AIResource StringId - The resource name of Open AI resource
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:elastic:OpenAI default /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/openAIIntegrations/{integrationName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0