azure-native.servicefabricmesh.Secret
Explore with Pulumi AI
This type describes a secret resource. Azure REST API version: 2018-09-01-preview. Prior API version in Azure Native 1.x: 2018-09-01-preview.
Example Usage
CreateOrUpdateSecret
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() => 
{
    var secret = new AzureNative.ServiceFabricMesh.Secret("secret", new()
    {
        Location = "EastUS",
        Properties = null,
        ResourceGroupName = "sbz_demo",
        SecretResourceName = "dbConnectionString",
        Tags = null,
    });
});
package main
import (
	servicefabricmesh "github.com/pulumi/pulumi-azure-native-sdk/servicefabricmesh/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := servicefabricmesh.NewSecret(ctx, "secret", &servicefabricmesh.SecretArgs{
			Location:           pulumi.String("EastUS"),
			Properties:         &servicefabricmesh.SecretResourcePropertiesArgs{},
			ResourceGroupName:  pulumi.String("sbz_demo"),
			SecretResourceName: pulumi.String("dbConnectionString"),
			Tags:               pulumi.StringMap{},
		})
		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.servicefabricmesh.Secret;
import com.pulumi.azurenative.servicefabricmesh.SecretArgs;
import com.pulumi.azurenative.servicefabricmesh.inputs.SecretResourcePropertiesArgs;
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 secret = new Secret("secret", SecretArgs.builder()
            .location("EastUS")
            .properties()
            .resourceGroupName("sbz_demo")
            .secretResourceName("dbConnectionString")
            .tags()
            .build());
    }
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const secret = new azure_native.servicefabricmesh.Secret("secret", {
    location: "EastUS",
    properties: {},
    resourceGroupName: "sbz_demo",
    secretResourceName: "dbConnectionString",
    tags: {},
});
import pulumi
import pulumi_azure_native as azure_native
secret = azure_native.servicefabricmesh.Secret("secret",
    location="EastUS",
    properties={},
    resource_group_name="sbz_demo",
    secret_resource_name="dbConnectionString",
    tags={})
resources:
  secret:
    type: azure-native:servicefabricmesh:Secret
    properties:
      location: EastUS
      properties: {}
      resourceGroupName: sbz_demo
      secretResourceName: dbConnectionString
      tags: {}
Create Secret Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Secret(name: string, args: SecretArgs, opts?: CustomResourceOptions);@overload
def Secret(resource_name: str,
           args: SecretArgs,
           opts: Optional[ResourceOptions] = None)
@overload
def Secret(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           properties: Optional[SecretResourcePropertiesArgs] = None,
           resource_group_name: Optional[str] = None,
           location: Optional[str] = None,
           secret_resource_name: Optional[str] = None,
           tags: Optional[Mapping[str, str]] = None)func NewSecret(ctx *Context, name string, args SecretArgs, opts ...ResourceOption) (*Secret, error)public Secret(string name, SecretArgs args, CustomResourceOptions? opts = null)
public Secret(String name, SecretArgs args)
public Secret(String name, SecretArgs args, CustomResourceOptions options)
type: azure-native:servicefabricmesh:Secret
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 SecretArgs
- 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 SecretArgs
- 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 SecretArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecretArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SecretArgs
- 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 examplesecretResourceResourceFromServicefabricmesh = new AzureNative.ServiceFabricMesh.Secret("examplesecretResourceResourceFromServicefabricmesh", new()
{
    Properties = new AzureNative.ServiceFabricMesh.Inputs.SecretResourcePropertiesArgs
    {
        Kind = "SecretResourceProperties",
        ContentType = "string",
        Description = "string",
    },
    ResourceGroupName = "string",
    Location = "string",
    SecretResourceName = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
example, err := servicefabricmesh.NewSecret(ctx, "examplesecretResourceResourceFromServicefabricmesh", &servicefabricmesh.SecretArgs{
	Properties: &servicefabricmesh.SecretResourcePropertiesArgs{
		Kind:        pulumi.String("SecretResourceProperties"),
		ContentType: pulumi.String("string"),
		Description: pulumi.String("string"),
	},
	ResourceGroupName:  pulumi.String("string"),
	Location:           pulumi.String("string"),
	SecretResourceName: pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
var examplesecretResourceResourceFromServicefabricmesh = new Secret("examplesecretResourceResourceFromServicefabricmesh", SecretArgs.builder()
    .properties(SecretResourcePropertiesArgs.builder()
        .kind("SecretResourceProperties")
        .contentType("string")
        .description("string")
        .build())
    .resourceGroupName("string")
    .location("string")
    .secretResourceName("string")
    .tags(Map.of("string", "string"))
    .build());
examplesecret_resource_resource_from_servicefabricmesh = azure_native.servicefabricmesh.Secret("examplesecretResourceResourceFromServicefabricmesh",
    properties={
        "kind": "SecretResourceProperties",
        "content_type": "string",
        "description": "string",
    },
    resource_group_name="string",
    location="string",
    secret_resource_name="string",
    tags={
        "string": "string",
    })
const examplesecretResourceResourceFromServicefabricmesh = new azure_native.servicefabricmesh.Secret("examplesecretResourceResourceFromServicefabricmesh", {
    properties: {
        kind: "SecretResourceProperties",
        contentType: "string",
        description: "string",
    },
    resourceGroupName: "string",
    location: "string",
    secretResourceName: "string",
    tags: {
        string: "string",
    },
});
type: azure-native:servicefabricmesh:Secret
properties:
    location: string
    properties:
        contentType: string
        description: string
        kind: SecretResourceProperties
    resourceGroupName: string
    secretResourceName: string
    tags:
        string: string
Secret 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 Secret resource accepts the following input properties:
- Properties
Pulumi.Azure Native. Service Fabric Mesh. Inputs. Secret Resource Properties 
- Describes the properties of a secret resource.
- ResourceGroup stringName 
- Azure resource group name
- Location string
- The geo-location where the resource lives
- SecretResource stringName 
- The name of the secret resource.
- Dictionary<string, string>
- Resource tags.
- Properties
SecretResource Properties Args 
- Describes the properties of a secret resource.
- ResourceGroup stringName 
- Azure resource group name
- Location string
- The geo-location where the resource lives
- SecretResource stringName 
- The name of the secret resource.
- map[string]string
- Resource tags.
- properties
SecretResource Properties 
- Describes the properties of a secret resource.
- resourceGroup StringName 
- Azure resource group name
- location String
- The geo-location where the resource lives
- secretResource StringName 
- The name of the secret resource.
- Map<String,String>
- Resource tags.
- properties
SecretResource Properties 
- Describes the properties of a secret resource.
- resourceGroup stringName 
- Azure resource group name
- location string
- The geo-location where the resource lives
- secretResource stringName 
- The name of the secret resource.
- {[key: string]: string}
- Resource tags.
- properties
SecretResource Properties Args 
- Describes the properties of a secret resource.
- resource_group_ strname 
- Azure resource group name
- location str
- The geo-location where the resource lives
- secret_resource_ strname 
- The name of the secret resource.
- Mapping[str, str]
- Resource tags.
- properties Property Map
- Describes the properties of a secret resource.
- resourceGroup StringName 
- Azure resource group name
- location String
- The geo-location where the resource lives
- secretResource StringName 
- The name of the secret resource.
- Map<String>
- Resource tags.
Outputs
All input properties are implicitly available as output properties. Additionally, the Secret resource produces the following output properties:
Supporting Types
SecretResourceProperties, SecretResourcePropertiesArgs      
- ContentType string
- The type of the content stored in the secret value. The value of this property is opaque to Service Fabric. Once set, the value of this property cannot be changed.
- Description string
- User readable description of the secret.
- ContentType string
- The type of the content stored in the secret value. The value of this property is opaque to Service Fabric. Once set, the value of this property cannot be changed.
- Description string
- User readable description of the secret.
- contentType String
- The type of the content stored in the secret value. The value of this property is opaque to Service Fabric. Once set, the value of this property cannot be changed.
- description String
- User readable description of the secret.
- contentType string
- The type of the content stored in the secret value. The value of this property is opaque to Service Fabric. Once set, the value of this property cannot be changed.
- description string
- User readable description of the secret.
- content_type str
- The type of the content stored in the secret value. The value of this property is opaque to Service Fabric. Once set, the value of this property cannot be changed.
- description str
- User readable description of the secret.
- contentType String
- The type of the content stored in the secret value. The value of this property is opaque to Service Fabric. Once set, the value of this property cannot be changed.
- description String
- User readable description of the secret.
SecretResourcePropertiesResponse, SecretResourcePropertiesResponseArgs        
- ProvisioningState string
- State of the resource.
- Status string
- Status of the resource.
- StatusDetails string
- Gives additional information about the current status of the secret.
- ContentType string
- The type of the content stored in the secret value. The value of this property is opaque to Service Fabric. Once set, the value of this property cannot be changed.
- Description string
- User readable description of the secret.
- ProvisioningState string
- State of the resource.
- Status string
- Status of the resource.
- StatusDetails string
- Gives additional information about the current status of the secret.
- ContentType string
- The type of the content stored in the secret value. The value of this property is opaque to Service Fabric. Once set, the value of this property cannot be changed.
- Description string
- User readable description of the secret.
- provisioningState String
- State of the resource.
- status String
- Status of the resource.
- statusDetails String
- Gives additional information about the current status of the secret.
- contentType String
- The type of the content stored in the secret value. The value of this property is opaque to Service Fabric. Once set, the value of this property cannot be changed.
- description String
- User readable description of the secret.
- provisioningState string
- State of the resource.
- status string
- Status of the resource.
- statusDetails string
- Gives additional information about the current status of the secret.
- contentType string
- The type of the content stored in the secret value. The value of this property is opaque to Service Fabric. Once set, the value of this property cannot be changed.
- description string
- User readable description of the secret.
- provisioning_state str
- State of the resource.
- status str
- Status of the resource.
- status_details str
- Gives additional information about the current status of the secret.
- content_type str
- The type of the content stored in the secret value. The value of this property is opaque to Service Fabric. Once set, the value of this property cannot be changed.
- description str
- User readable description of the secret.
- provisioningState String
- State of the resource.
- status String
- Status of the resource.
- statusDetails String
- Gives additional information about the current status of the secret.
- contentType String
- The type of the content stored in the secret value. The value of this property is opaque to Service Fabric. Once set, the value of this property cannot be changed.
- description String
- User readable description of the secret.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:servicefabricmesh:Secret dbConnectionString /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/secrets/{secretResourceName} 
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0