func NewPolicy(ctx *pulumi.Context,
	name string, args *PolicyArgs, opts ...pulumi.ResourceOption) (*Policy, error) {
	if args == nil {
		return nil, errors.New("missing one or more required arguments")
	}

	if args.EvaluatorType == nil {
		return nil, errors.New("invalid value for required argument 'EvaluatorType'")
	}
	if args.LabName == nil {
		return nil, errors.New("invalid value for required argument 'LabName'")
	}
	if args.PolicySetName == nil {
		return nil, errors.New("invalid value for required argument 'PolicySetName'")
	}
	if args.ResourceGroupName == nil {
		return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
	}
	if args.Threshold == nil {
		return nil, errors.New("invalid value for required argument 'Threshold'")
	}
	var resource Policy
	err := ctx.RegisterResource("azure:devtest/policy:Policy", name, args, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}
// NewPolicy registers a new resource with the given unique name, arguments, and options.
NewPolicy registers a new resource with the given unique name, arguments, and options.
// NewPolicy registers a new resource with the given unique name arguments and options .
func NewPolicy(ctx *pulumi.Context,
	name string, args *PolicyArgs, opts ...pulumi.ResourceOption) (*Policy, error) {
	if args == nil {
		return nil, errors.New("missing one or more required arguments")
	}
	if args.EvaluatorType == nil {
		return nil, errors.New("invalid value for required argument 'EvaluatorType'")
	}
	if args.LabName == nil {
		return nil, errors.New("invalid value for required argument 'LabName'")
	}
	if args.PolicySetName == nil {
		return nil, errors.New("invalid value for required argument 'PolicySetName'")
	}
	if args.ResourceGroupName == nil {
		return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
	}
	if args.Threshold == nil {
		return nil, errors.New("invalid value for required argument 'Threshold'")
	}
	var resource Policy
	err := ctx.RegisterResource("azure:devtest/policy:Policy", name, args, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}
func NewPolicy ( ctx * pulumi . Context , name string , args * PolicyArgs , opts ... pulumi . ResourceOption ) ( * Policy , error ) { if args == nil { return nil , errors . New ( " " ) } if args . EvaluatorType == nil { return nil , errors . New ( " " ) } if args . LabName == nil { return nil , errors . New ( " " ) } if args . PolicySetName == nil { return nil , errors . New ( " " ) } if args . ResourceGroupName == nil { return nil , errors . New ( " " ) } if args . Threshold == nil { return nil , errors . New ( " " ) } var resource Policy err := ctx . RegisterResource ( " " , name , args , & resource , opts ... ) if err != nil { return nil , err } return & resource , nil }
NewPolicy registers a new resource with the given unique name, arguments, and options.
NewPolicy registers a new resource with the given unique name arguments and options .