ibm.AppConfigSegment
Explore with Pulumi AI
Create, update, or delete an segment by using IBM Cloud™ App Configuration. For more information, about App Configuration segment, see segments.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const appConfigSegment = new ibm.AppConfigSegment("appConfigSegment", {
description: "description",
guid: "guid",
rules: [{
attributeName: "attribute_name",
operator: "operator",
values: "values",
}],
segmentId: "segment_id",
tags: "tags",
});
import pulumi
import pulumi_ibm as ibm
app_config_segment = ibm.AppConfigSegment("appConfigSegment",
description="description",
guid="guid",
rules=[{
"attribute_name": "attribute_name",
"operator": "operator",
"values": "values",
}],
segment_id="segment_id",
tags="tags")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ibm.NewAppConfigSegment(ctx, "appConfigSegment", &ibm.AppConfigSegmentArgs{
Description: pulumi.String("description"),
Guid: pulumi.String("guid"),
Rules: ibm.AppConfigSegmentRuleArray{
&ibm.AppConfigSegmentRuleArgs{
AttributeName: pulumi.String("attribute_name"),
Operator: pulumi.String("operator"),
Values: pulumi.StringArray("values"),
},
},
SegmentId: pulumi.String("segment_id"),
Tags: pulumi.String("tags"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var appConfigSegment = new Ibm.AppConfigSegment("appConfigSegment", new()
{
Description = "description",
Guid = "guid",
Rules = new[]
{
new Ibm.Inputs.AppConfigSegmentRuleArgs
{
AttributeName = "attribute_name",
Operator = "operator",
Values = "values",
},
},
SegmentId = "segment_id",
Tags = "tags",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.AppConfigSegment;
import com.pulumi.ibm.AppConfigSegmentArgs;
import com.pulumi.ibm.inputs.AppConfigSegmentRuleArgs;
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 appConfigSegment = new AppConfigSegment("appConfigSegment", AppConfigSegmentArgs.builder()
.description("description")
.guid("guid")
.rules(AppConfigSegmentRuleArgs.builder()
.attributeName("attribute_name")
.operator("operator")
.values("values")
.build())
.segmentId("segment_id")
.tags("tags")
.build());
}
}
resources:
appConfigSegment:
type: ibm:AppConfigSegment
properties:
description: description
guid: guid
rules:
- attributeName: attribute_name
operator: operator
values: values
segmentId: segment_id
tags: tags
Create AppConfigSegment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AppConfigSegment(name: string, args: AppConfigSegmentArgs, opts?: CustomResourceOptions);
@overload
def AppConfigSegment(resource_name: str,
args: AppConfigSegmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AppConfigSegment(resource_name: str,
opts: Optional[ResourceOptions] = None,
guid: Optional[str] = None,
rules: Optional[Sequence[AppConfigSegmentRuleArgs]] = None,
segment_id: Optional[str] = None,
app_config_segment_id: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
tags: Optional[str] = None)
func NewAppConfigSegment(ctx *Context, name string, args AppConfigSegmentArgs, opts ...ResourceOption) (*AppConfigSegment, error)
public AppConfigSegment(string name, AppConfigSegmentArgs args, CustomResourceOptions? opts = null)
public AppConfigSegment(String name, AppConfigSegmentArgs args)
public AppConfigSegment(String name, AppConfigSegmentArgs args, CustomResourceOptions options)
type: ibm:AppConfigSegment
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 AppConfigSegmentArgs
- 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 AppConfigSegmentArgs
- 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 AppConfigSegmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AppConfigSegmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AppConfigSegmentArgs
- 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 appConfigSegmentResource = new Ibm.AppConfigSegment("appConfigSegmentResource", new()
{
Guid = "string",
Rules = new[]
{
new Ibm.Inputs.AppConfigSegmentRuleArgs
{
AttributeName = "string",
Operator = "string",
Values = new[]
{
"string",
},
},
},
SegmentId = "string",
AppConfigSegmentId = "string",
Description = "string",
Name = "string",
Tags = "string",
});
example, err := ibm.NewAppConfigSegment(ctx, "appConfigSegmentResource", &ibm.AppConfigSegmentArgs{
Guid: pulumi.String("string"),
Rules: ibm.AppConfigSegmentRuleArray{
&ibm.AppConfigSegmentRuleArgs{
AttributeName: pulumi.String("string"),
Operator: pulumi.String("string"),
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
},
SegmentId: pulumi.String("string"),
AppConfigSegmentId: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
Tags: pulumi.String("string"),
})
var appConfigSegmentResource = new AppConfigSegment("appConfigSegmentResource", AppConfigSegmentArgs.builder()
.guid("string")
.rules(AppConfigSegmentRuleArgs.builder()
.attributeName("string")
.operator("string")
.values("string")
.build())
.segmentId("string")
.appConfigSegmentId("string")
.description("string")
.name("string")
.tags("string")
.build());
app_config_segment_resource = ibm.AppConfigSegment("appConfigSegmentResource",
guid="string",
rules=[{
"attribute_name": "string",
"operator": "string",
"values": ["string"],
}],
segment_id="string",
app_config_segment_id="string",
description="string",
name="string",
tags="string")
const appConfigSegmentResource = new ibm.AppConfigSegment("appConfigSegmentResource", {
guid: "string",
rules: [{
attributeName: "string",
operator: "string",
values: ["string"],
}],
segmentId: "string",
appConfigSegmentId: "string",
description: "string",
name: "string",
tags: "string",
});
type: ibm:AppConfigSegment
properties:
appConfigSegmentId: string
description: string
guid: string
name: string
rules:
- attributeName: string
operator: string
values:
- string
segmentId: string
tags: string
AppConfigSegment 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 AppConfigSegment resource accepts the following input properties:
- Guid string
- The GUID of the App Configuration service. Fetch GUID from the service instance credentials section of the dashboard.
- Rules
List<App
Config Segment Rule> List of rules that determine if the entity belongs to the segment during feature / property evaluation.
Nested scheme for
rules
:- Segment
Id string - (String) Segment id.
- App
Config stringSegment Id - Description string
- The Segment description.
- Name string
- The Segment name.
- string
- Tags associated with the segments.
- Guid string
- The GUID of the App Configuration service. Fetch GUID from the service instance credentials section of the dashboard.
- Rules
[]App
Config Segment Rule Args List of rules that determine if the entity belongs to the segment during feature / property evaluation.
Nested scheme for
rules
:- Segment
Id string - (String) Segment id.
- App
Config stringSegment Id - Description string
- The Segment description.
- Name string
- The Segment name.
- string
- Tags associated with the segments.
- guid String
- The GUID of the App Configuration service. Fetch GUID from the service instance credentials section of the dashboard.
- rules
List<App
Config Segment Rule> List of rules that determine if the entity belongs to the segment during feature / property evaluation.
Nested scheme for
rules
:- segment
Id String - (String) Segment id.
- app
Config StringSegment Id - description String
- The Segment description.
- name String
- The Segment name.
- String
- Tags associated with the segments.
- guid string
- The GUID of the App Configuration service. Fetch GUID from the service instance credentials section of the dashboard.
- rules
App
Config Segment Rule[] List of rules that determine if the entity belongs to the segment during feature / property evaluation.
Nested scheme for
rules
:- segment
Id string - (String) Segment id.
- app
Config stringSegment Id - description string
- The Segment description.
- name string
- The Segment name.
- string
- Tags associated with the segments.
- guid str
- The GUID of the App Configuration service. Fetch GUID from the service instance credentials section of the dashboard.
- rules
Sequence[App
Config Segment Rule Args] List of rules that determine if the entity belongs to the segment during feature / property evaluation.
Nested scheme for
rules
:- segment_
id str - (String) Segment id.
- app_
config_ strsegment_ id - description str
- The Segment description.
- name str
- The Segment name.
- str
- Tags associated with the segments.
- guid String
- The GUID of the App Configuration service. Fetch GUID from the service instance credentials section of the dashboard.
- rules List<Property Map>
List of rules that determine if the entity belongs to the segment during feature / property evaluation.
Nested scheme for
rules
:- segment
Id String - (String) Segment id.
- app
Config StringSegment Id - description String
- The Segment description.
- name String
- The Segment name.
- String
- Tags associated with the segments.
Outputs
All input properties are implicitly available as output properties. Additionally, the AppConfigSegment resource produces the following output properties:
- Created
Time string - (Timestamp) Creation time of the segment.
- Href string
- (String) Segment URL.
- Id string
- The provider-assigned unique ID for this managed resource.
- Updated
Time string - (Timestamp) Last modified time of the segment data.
- Created
Time string - (Timestamp) Creation time of the segment.
- Href string
- (String) Segment URL.
- Id string
- The provider-assigned unique ID for this managed resource.
- Updated
Time string - (Timestamp) Last modified time of the segment data.
- created
Time String - (Timestamp) Creation time of the segment.
- href String
- (String) Segment URL.
- id String
- The provider-assigned unique ID for this managed resource.
- updated
Time String - (Timestamp) Last modified time of the segment data.
- created
Time string - (Timestamp) Creation time of the segment.
- href string
- (String) Segment URL.
- id string
- The provider-assigned unique ID for this managed resource.
- updated
Time string - (Timestamp) Last modified time of the segment data.
- created_
time str - (Timestamp) Creation time of the segment.
- href str
- (String) Segment URL.
- id str
- The provider-assigned unique ID for this managed resource.
- updated_
time str - (Timestamp) Last modified time of the segment data.
- created
Time String - (Timestamp) Creation time of the segment.
- href String
- (String) Segment URL.
- id String
- The provider-assigned unique ID for this managed resource.
- updated
Time String - (Timestamp) Last modified time of the segment data.
Look up Existing AppConfigSegment Resource
Get an existing AppConfigSegment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AppConfigSegmentState, opts?: CustomResourceOptions): AppConfigSegment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
app_config_segment_id: Optional[str] = None,
created_time: Optional[str] = None,
description: Optional[str] = None,
guid: Optional[str] = None,
href: Optional[str] = None,
name: Optional[str] = None,
rules: Optional[Sequence[AppConfigSegmentRuleArgs]] = None,
segment_id: Optional[str] = None,
tags: Optional[str] = None,
updated_time: Optional[str] = None) -> AppConfigSegment
func GetAppConfigSegment(ctx *Context, name string, id IDInput, state *AppConfigSegmentState, opts ...ResourceOption) (*AppConfigSegment, error)
public static AppConfigSegment Get(string name, Input<string> id, AppConfigSegmentState? state, CustomResourceOptions? opts = null)
public static AppConfigSegment get(String name, Output<String> id, AppConfigSegmentState state, CustomResourceOptions options)
resources: _: type: ibm:AppConfigSegment get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- App
Config stringSegment Id - Created
Time string - (Timestamp) Creation time of the segment.
- Description string
- The Segment description.
- Guid string
- The GUID of the App Configuration service. Fetch GUID from the service instance credentials section of the dashboard.
- Href string
- (String) Segment URL.
- Name string
- The Segment name.
- Rules
List<App
Config Segment Rule> List of rules that determine if the entity belongs to the segment during feature / property evaluation.
Nested scheme for
rules
:- Segment
Id string - (String) Segment id.
- string
- Tags associated with the segments.
- Updated
Time string - (Timestamp) Last modified time of the segment data.
- App
Config stringSegment Id - Created
Time string - (Timestamp) Creation time of the segment.
- Description string
- The Segment description.
- Guid string
- The GUID of the App Configuration service. Fetch GUID from the service instance credentials section of the dashboard.
- Href string
- (String) Segment URL.
- Name string
- The Segment name.
- Rules
[]App
Config Segment Rule Args List of rules that determine if the entity belongs to the segment during feature / property evaluation.
Nested scheme for
rules
:- Segment
Id string - (String) Segment id.
- string
- Tags associated with the segments.
- Updated
Time string - (Timestamp) Last modified time of the segment data.
- app
Config StringSegment Id - created
Time String - (Timestamp) Creation time of the segment.
- description String
- The Segment description.
- guid String
- The GUID of the App Configuration service. Fetch GUID from the service instance credentials section of the dashboard.
- href String
- (String) Segment URL.
- name String
- The Segment name.
- rules
List<App
Config Segment Rule> List of rules that determine if the entity belongs to the segment during feature / property evaluation.
Nested scheme for
rules
:- segment
Id String - (String) Segment id.
- String
- Tags associated with the segments.
- updated
Time String - (Timestamp) Last modified time of the segment data.
- app
Config stringSegment Id - created
Time string - (Timestamp) Creation time of the segment.
- description string
- The Segment description.
- guid string
- The GUID of the App Configuration service. Fetch GUID from the service instance credentials section of the dashboard.
- href string
- (String) Segment URL.
- name string
- The Segment name.
- rules
App
Config Segment Rule[] List of rules that determine if the entity belongs to the segment during feature / property evaluation.
Nested scheme for
rules
:- segment
Id string - (String) Segment id.
- string
- Tags associated with the segments.
- updated
Time string - (Timestamp) Last modified time of the segment data.
- app_
config_ strsegment_ id - created_
time str - (Timestamp) Creation time of the segment.
- description str
- The Segment description.
- guid str
- The GUID of the App Configuration service. Fetch GUID from the service instance credentials section of the dashboard.
- href str
- (String) Segment URL.
- name str
- The Segment name.
- rules
Sequence[App
Config Segment Rule Args] List of rules that determine if the entity belongs to the segment during feature / property evaluation.
Nested scheme for
rules
:- segment_
id str - (String) Segment id.
- str
- Tags associated with the segments.
- updated_
time str - (Timestamp) Last modified time of the segment data.
- app
Config StringSegment Id - created
Time String - (Timestamp) Creation time of the segment.
- description String
- The Segment description.
- guid String
- The GUID of the App Configuration service. Fetch GUID from the service instance credentials section of the dashboard.
- href String
- (String) Segment URL.
- name String
- The Segment name.
- rules List<Property Map>
List of rules that determine if the entity belongs to the segment during feature / property evaluation.
Nested scheme for
rules
:- segment
Id String - (String) Segment id.
- String
- Tags associated with the segments.
- updated
Time String - (Timestamp) Last modified time of the segment data.
Supporting Types
AppConfigSegmentRule, AppConfigSegmentRuleArgs
- Attribute
Name string - The Attribute name.
- Operator string
- The Operator to be used for the evaluation if the entity belongs to the segment.
- Values List<string>
- List of values. Entities matching any of the given values will be considered to belong to the segment.
- Attribute
Name string - The Attribute name.
- Operator string
- The Operator to be used for the evaluation if the entity belongs to the segment.
- Values []string
- List of values. Entities matching any of the given values will be considered to belong to the segment.
- attribute
Name String - The Attribute name.
- operator String
- The Operator to be used for the evaluation if the entity belongs to the segment.
- values List<String>
- List of values. Entities matching any of the given values will be considered to belong to the segment.
- attribute
Name string - The Attribute name.
- operator string
- The Operator to be used for the evaluation if the entity belongs to the segment.
- values string[]
- List of values. Entities matching any of the given values will be considered to belong to the segment.
- attribute_
name str - The Attribute name.
- operator str
- The Operator to be used for the evaluation if the entity belongs to the segment.
- values Sequence[str]
- List of values. Entities matching any of the given values will be considered to belong to the segment.
- attribute
Name String - The Attribute name.
- operator String
- The Operator to be used for the evaluation if the entity belongs to the segment.
- values List<String>
- List of values. Entities matching any of the given values will be considered to belong to the segment.
Import
The ibm_app_config_segment
resource can be imported by using guid
of the App Configuration instance and segmentId
. Get the guid
from the service instance credentials section of the dashboard.
Syntax
$ pulumi import ibm:index/appConfigSegment:AppConfigSegment sample <guid/segmentId>
Example
$ pulumi import ibm:index/appConfigSegment:AppConfigSegment sample 272111153-c118-4116-8116-b811fbc31132/sample_segment
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.